You can get Form Control label text by calling labeltext() method MyFormControl.labelText();
Category: AX – D365FFO
AX / D365FO – Set up Data Entities Export recurring jobs
When you create a recurring data job in Dynamics 365 (AX7) you will be asked for an application id in the "Setup authorization policy" tab. This post explains how to do the right setup : https://axbloggerblog.blogspot.com/2017/02/d365-recurring-integration-application.html
AX / D365FO – Change the text colour of a Form field using X++
This example shows how to change the text colour of a Form control through X++ code. The color will be changed in RED TextControl.colorScheme(FormColorScheme::RGB); TextControl.foregroundColor(WinAPI::RGB2int(255,0,0)); And this will be the result If you want to convert to GREEN just modify like shown below TextControl.colorScheme(FormColorScheme::RGB); TextControl.foregroundColor(WinAPI::RGB2int(0,128,0));
AX / D365FO – How to change font size of control labels in D365 forms
Actually, the only way I found to increase Font Size of a Form Static text is to change the Style Property value of the control By default the property is set to Auto and the text appears in a normal size (like shown below) But I wanto to increase the size so I changed the … Continue reading AX / D365FO – How to change font size of control labels in D365 forms
AX / D365FO – Get FieldId from Field Name (String)
To get FieldId from a Field name, where the Field name is a string type you can use fieldname2id() method int fieldId = fieldname2id(tableNum(Salestable), 'SalesId');
AX / D365FO – Get tableId from Table Name (String)
To get TableId from table name, where the table name is a string type you can use tableName2Id() method int tableId = tableName2Id('SalesTable');
AX / D365FO – Adding ConfigId in SALESLINE using X++
Code below shows the proper way of adding SalesLine with ConfigId SalesLine salesLine; InventDim inventDim; SalesId salesId = '100001' ItemId itemId = 'ITM1001'; ConfigId configId = 'CFG1001'; salesLine.initValue(); /* Init SalesLine from SalesTable*/ salesLine.SalesId = salesId; salesLine.initFromSalesTable(salesTable); /* End*/ /* Set SalesLine Item*/ salesLine.ItemId = itemId; /* End*/ /* Set Retail Variant Id*/ inventDim.configId = … Continue reading AX / D365FO – Adding ConfigId in SALESLINE using X++
AX / D365FO – Insert a Yes/No Message box on a Form Click Button event
While any operation is performed by the user, there are cases such as need to receive confirmation from the user to perform the operation. In these cases we can use “DialogButton” for user interaction not say “Yes/No” to perform the operation. Below is an example code public void clicked() { DialogButton diagBut; str strMessage = … Continue reading AX / D365FO – Insert a Yes/No Message box on a Form Click Button event
AX / D365FO – How To Call A Form From Another Form
Good post that describes how to call a new Form from a calling form : https://dynamics365musings.com/call-a-form-from-another-form/
AX / D365FO – Using “Not Like” in X++ select statements
If you want to use wild-cards in Ax, you can write a SQL statement with a LIKE keyword SalesTable salestable; select firstonly salestable where salestable.salesId like '123*'; But if you want to use NOT LIKE you can do in 3 different ways : SalesTable salestable; select firstonly salestable where !(salestable.salesId like '123*'); SalesTable salestable, salestableExists; … Continue reading AX / D365FO – Using “Not Like” in X++ select statements