acumatica

How can I implement a Session Variable in Acumatica?

南楼画角 提交于 2020-01-15 12:35:06
问题 I have a processing page in Acumatica that performs a Validation. When we run this process, then switch to another record to perform the process again, we don't want to rerun Validation every time. So, I need something outside of the scope of the BLC (like a flag) that I can set and will keep set until the Session or Page expires. How can I do this? 回答1: You can use PXContext.Session.SetString(key, value); to set string value in the session. And PXContext.Session[key] to retrieve value. 来源:

How can you change current tab programmatically with Acumatica?

元气小坏坏 提交于 2020-01-15 11:01:50
问题 When I launch a custom Framework page, i would to be able to activate one of the tabs programmatically depending on certain conditions. Am i stuck using javaScript or is there another way? 回答1: There are a few posts already on this question with answers: This is the best answer: How to conditionally hide PXTabItem inside an Acumatica screen? Also, searching hide tab you will find what you need. 回答2: For information, this can be achieved statically with PXTab control SelectedIndex property: 来源

How to reference new field if it is DAC Extension

ぃ、小莉子 提交于 2020-01-15 09:20:11
问题 I have a couple of new fields in Sales Order (Screen ID - SM204505). I have added these fields from customization project > Data Access. Once published this customization project all the new fields are created in SOOrder table. Now I want to reference these new fields in my Customization Project in Visual Studio to fill some other values (i.e. add some more business logic). For example, there is a custom field called UsrReasonCode added to SOOrder table. And then I want to write some business

How to add Button for downloading excel file in Acumatica

纵饮孤独 提交于 2020-01-11 13:15:32
问题 I'm trying to add button to Users Maintenance and on button's click download excel file, containing some data. I have created PXAction and it's method as above: public PXAction<Users> getUsers; [PXUIField(DisplayName = "Get Users", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select,Visible = true), PXButton(CommitChanges = true)] public IEnumerable GetUsers(PXAdapter adapter) { var accessByRoles = PXSelect<RolesInGraph>.Select(this.Base); var usersByRole = PXSelect

GroupBy aggregate with record count in projection DAC

冷暖自知 提交于 2020-01-07 04:47:12
问题 I'm currently working on a processing screen that should be showing a listing of custom orders from my DAC summarized by orderid. The table itself stores a full listing of the order line items. For example: OrderNbr, OrderDate, LineNbr, Desc, InvtId, Qty, ExtPrice, isValidated The grid of the processing screen should show the following information OrderNbr, OrderDate, Desc, Count(LineNbr), Sum(ExtPrice) I've created a projection DAC to group the lines by OrderNbr/OrderDate [PXProjection

Add Custom action as part of the Action dropdown (AEF)

走远了吗. 提交于 2020-01-07 03:49:05
问题 I would know how to add an Action button but did not manage to identify how to add this under the Actions menu. It is being added as a separate link button and not as part of the actions sub-menu. How can you achieve this please? 回答1: This post should help with your answer: Adding Custom Action to "Actions" Drop Down in Extension You can add it by using AddMenuAction on your parent button ( action in this example): MyGraph.action.AddMenuAction(myCustomAction); 来源: https://stackoverflow.com

Acumatica: Sql view based on Row Level Security

落花浮王杯 提交于 2020-01-06 21:13:16
问题 I have configured row level security, then I want to create sql view based on this to support for my custom report. Updated, below is my view SELECT s.CompanyID , DistributorID = s.BranchID , s.SiteID , s.SiteCD , s.Descr , s.Active , IsDefault = s.UsrIsDefault , u.Username FROM dbo.INSite s FULL JOIN dbo.Users u ON u.CompanyID = s.CompanyID WHERE SUBSTRING(s.GroupMask, 1, 4) = '' OR (0 = SUBSTRING(s.GroupMask, 1, 4) & (SELECT SUM(CONVERT(BIGINT, rg.GroupMask & -1)) FROM dbo.RelationGroup rg

Create additional “upload from file” button in header of Detail Grid Purchase Receipt in Acumatica

只愿长相守 提交于 2020-01-06 08:23:38
问题 Is it possible to add new additional button "Upload from file" in header of Document Detail transaction in Purchase Receipt like the following screenshot ? I want to implement the same way like in screen Purchase Order, please refer to the following screenshot. Does anyone knows how to provide this goal ? Thanks. 回答1: I create an extension of POReceiptEntry, and use the following codes: public class POReceiptEntry_Extension : PXGraphExtension<POReceiptEntry> { #region Event Handlers

How can I open an editable, sendable e-mail screen with prepopoulated values?

。_饼干妹妹 提交于 2020-01-06 06:09:38
问题 I am trying to create an e-mail with to and from already filled in. To create the e-mail, I'm creating a graph instance of CREmailActivityMaint. Whenever I attempt to assign new objects to the CREmailActivityMaint.CurrentMessage or CREmailActivityMaint.Message objects so that I can set values, the opening page becomes uneditable and Send is hidden: Also when I enter values, not all of them show. In this, I entered To, From, Subject, Summary, and Body, but Body and Summary show nothing. Also

How to pass value to confirmation popup from custom screen

 ̄綄美尐妖づ 提交于 2020-01-06 05:45:09
问题 I need to fire Complete Order action of Production Order Maintenance screen from my custom screen, the issue is, when action is fired am getting an error saying, "Are you sure want to complete the order" this is the same confirmation message we get when we do from Production Order Maintenance screen as well, my question is, how we can avoid this popup or how i can pass value to this popup from my custom graph. ProdMaintGraph.ProdMaintRecords.Current = ProdItem; ProdMaintGraph.completeorder