acumatica

How to call SetPropertyException from another event handler?

醉酒当歌 提交于 2019-12-08 05:59:27
问题 Below is my code to insert whatever value is entered into my UsrWLAmt field into my BudgetGrid representing the history of the fields values. I want to raise a warning prompting the user to enter a value into the details field in the BudgetGrid History protected void PMProject_UsrWLAmt_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e, PXFieldUpdated InvokeBaseHandler) { if(InvokeBaseHandler != null) InvokeBaseHandler(cache, e); var row = (PMProject)e.Row; PMProject con = Base.Project

How do I upload a file to an Acumatica Screen through HTTP virtual path?

末鹿安然 提交于 2019-12-08 04:24:32
问题 How do I upload a file to an Acumatica Screen through HTTP virtual path? For example, I would like to upload mysite.com/files/abc.pdf to the Sales orders screen. 回答1: Below is a code snippet to achieve your goal.It is reading file from HTTP URL and attaching it to one of the existing Case. //Graph for file management PX.SM.UploadFileMaintenance filegraph = PXGraph.CreateInstance<PX.SM.UploadFileMaintenance>(); //Since you need file from HTTP URL - below is a sample WebRequest request =

How to automatically create Note record in Acumatica?

瘦欲@ 提交于 2019-12-08 03:49:02
问题 I've noticed that whenever an AR Invoice gets saved, a record gets created in the Note table with the new invoice's note ID. Can you tell me how that is being accomplished? I'd like to get one of my screens to do the same thing. I guess there must be some kind of attribute on the either the DAC or the graph but I can't find it. I have the PXNote attribute on the NoteID column in my DAC but it does not cause a Note record to be automatically created. Thanks for your help. 回答1: To have Note

How to automatically create Note record in Acumatica?

帅比萌擦擦* 提交于 2019-12-07 15:57:25
I've noticed that whenever an AR Invoice gets saved, a record gets created in the Note table with the new invoice's note ID. Can you tell me how that is being accomplished? I'd like to get one of my screens to do the same thing. I guess there must be some kind of attribute on the either the DAC or the graph but I can't find it. I have the PXNote attribute on the NoteID column in my DAC but it does not cause a Note record to be automatically created. Thanks for your help. To have Note record automatically created when a new parent record gets saved, one should invoke the static PXNoteAttribute

Dynamically changing PXSelector in Acumatica

纵饮孤独 提交于 2019-12-07 08:04:00
问题 I have the following use case: Acumatica combo box / dropdown, which can have 8 or so values, the selection of which determines the table / DAC used to present in a PXSelector. e.g.: -If user select option a, I need to show in PXSelector values from Table A -If user select option b, I need to show in PXSelector values from Table B -If user select option c, I need to show in PXSelector value from Table C I understand that I'd have to use a Custom Selector Attribute, but the details of how to

How to add an action and handler to the Process Shipments screen?

大城市里の小女人 提交于 2019-12-07 07:41:27
How do I add an action and handler to the Process Shipments screen? We want to add an action to the Action combobox on screen SO503000, and then add a handler in code to process the new action. We want to do this without having to override the huge switch/case statement for Action in the SOShipmentEntry graph. The PXAutomationMenu attribute pulls from Automation Steps all actions, which have appropriate processing screen set up as Mass Processing Screen: To extend the list of actions available on the Process Shipments screen, please proceed as follows: Declare custom action within a BLC

Checkbox control in a grid is not triggering fieldupdated event

点点圈 提交于 2019-12-06 06:18:18
I have a selected checkbox on a custom grid is not triggering the Fieldupdated event. protected void MyTable_Selected_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e, PXFieldUpdated del) { del?.Invoke(cache, e); var row = (MyTable)e.Row; if(row.Selected == true ) { // } } The following is the code in aspx page <px:PXCheckBox ID="edSelected" runat="server" AlreadyLocalized="False" CommitChanges="True" DataField="Selected" Text="Selected"> </px:PXCheckBox> DAC definition for the field #region Selected public abstract class selected : IBqlField { } /// <summary> /// Used for selection on

Acumatica - Creating customer payment method with api

ε祈祈猫儿з 提交于 2019-12-06 04:53:50
What is the correct way to create a customer payment method using the API? This will also answer how to work with a grid that has a key value pair vs just storing values into a particular field. This code has been in use and functioning correctly for almost a year now and then starting earlier this week it no longer works. // Connect to Acumatica context = new acumatica.Screen(); context.CookieContainer = new System.Net.CookieContainer(); context.AllowAutoRedirect = true; context.EnableDecompression = true; context.Timeout = 1000000; context.Url = Properties.Settings.Default.WebServiceURL;

Updating User defined field in POOrder while creating Drop ship PO

雨燕双飞 提交于 2019-12-06 04:51:42
I have to override function to create drop ship PO and update custom field in PO Table based on sales price margin goes below certain percentage. I have gone through the source code for POCreate. The PO is created through static function public static PXRedirectRequiredException CreatePOOrders(List<POFixedDemand> list, DateTime? PurchDate, bool extSort) How to override and add my logic to creating drop-ship PO? Philippe The best way would be to attach event handlers on what you need. This is not a simple case but here's an example I wrote a couple months ago. This code is changing the POLine

Dynamically changing PXSelector in Acumatica

独自空忆成欢 提交于 2019-12-05 14:08:05
I have the following use case: Acumatica combo box / dropdown, which can have 8 or so values, the selection of which determines the table / DAC used to present in a PXSelector. e.g.: -If user select option a, I need to show in PXSelector values from Table A -If user select option b, I need to show in PXSelector values from Table B -If user select option c, I need to show in PXSelector value from Table C I understand that I'd have to use a Custom Selector Attribute, but the details of how to do this are not clear. As you said, you need to implement an attribute that inherits from the