AX 2012: Refresh caller form datasource

The following code refreshes the caller form datasource from the calling form: void clicked() { Args arg = new Args(); FormRun formRun; ; arg = new args(formstr(YourForm)); arg.record(yourTable); arg.caller(this); formRun = classFactory.formRunClass(arg); formRun.init(); formRun.run(); formRun.wait(); formRun.detach(); YourTable_DS.reread(); YourTable_DS.rereadReferenceDataSources(); YourTable_DS.research(true); } 1. reread() - Rereads the current record from the database 2. rereadReferenceDataSources() - Rereads the reference... Continue Reading →

AX 2012: How to open a form in X++

Using FormRun: void clicked() { Args args; FormRun formRun; args = new Args(formstr(CustTable)); args.record(custTableLocal); formRun = classFactory.formRunClass(args); formRun.init(); formRun.run(); formRun.wait(); formRun.detach(); CustTable_DS.research(); } Using MenuFunction: void clicked() { Args args; args = new Args(); args.caller(this); args.parmObject(list); new MenuFunction(menuItemDisplayStr(SalesTable), MenuItemType::Display).run(args); }

AX 2012: Manual Charges

Once you have setup Charges Codes, you can add manual charges to Sales Order (SO) or Purchase Order (PO). The question is why do we need to add charges manually to orders if we have the auto charges functionality? Typically we add manual charges to an order if it is not a regular one, which... Continue Reading →

AX 2012: Create lookup in X++

To create a lookup on a control (e.g. StringEdit control), override the lookup method of that control and copy paste the following code snippet in it. Of course, you will need to substitute datasource of the query according to your requirements. public void lookup() { Query query; QueryBuildDataSource datasourceModule; QueryBuildDataSource datasourceLanguage; QueryBuildRange rangeElementType; QueryBuildRange rangeModuleId;... Continue Reading →

AX 2012: Charges Codes

Before you plan to add manual or automatic charges when you create a sales or purchase order, you must setup Charges Codes. They are used to define the kind of charge and how the charge is going to be debited or credited. You can setup charges by navigating to Setup → Charges → Charges codes in the... Continue Reading →

AX 2012: All about Batch processing

In this post, you can learn about the following: 1. Batch Server Configuration Learn about how to set maximum no. of threads and their scheduling. Indicating which AOS instances are batch servers and which are load balancers. 2. Batch Group Configuration Learn how to configure batch groups. Select AOS instances available for your batch job. 2.... Continue Reading →

Blog at WordPress.com.

Up ↑