To indentitfy blocking session you can use sp_who2 system stored procedure. Below is sample code USE master GO EXEC sp_who2 GO
Author: Marco Saad
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
AX / D365FO – Create Sales order and Purchase order using X++
In this article, we will see how to create sales order and purchase order using x++ >> Create Sales order and Purchase order using X++
AX / D365FO – Convert String to Real (str2num)
To convenrt a strint into real you can use str2Num() method static void stringToReal(Args _args) { Str myNumber = '56,01'; Real output; output = str2num(myNumber); info(strfmt('Output: %1', output)); }
AX / D365FO – Check if a FormControl is of type “String”, “Date” or “numeric”
I often work with FormControls and need to understand the type of control in order to use the right properties and methods. The code below shows how to intercept the control type and cast it with the matching type public void getFormControlType(FormControl _myFormControl) { FormRealControl callingRealControl; FormStringControl callingStringControl; FormIntControl callingIntControl; FormInt64Control callingInt64Control; FormDateControl callingDateControl; switch … Continue reading AX / D365FO – Check if a FormControl is of type “String”, “Date” or “numeric”
AX / D365FO – Get Form Control from its name
I have a form and I want to get Form Control objects only from Control name. Thi s example shows hot to do that element.design().controlName('MyFormControlName')
AX / D365FO – How To Call A Form Using X++
Inside my form I want to open another form. To achieve this goal without writing code I can use a Display Menu item, but I can also use a normal button to open it. Using a normal button requires write some X++ code. First create a button on your form's Button group Then override clicked() … Continue reading AX / D365FO – How To Call A Form Using X++
AX / D365FO – Show “NoYes” Enum field as Combobox instead of Checkbox
I'm building a form from a table. One of its fields is a enum YesNo. I can't figure out why every time I add it to the form it appears as a checkbox instead of a combobox. I want a combobox with a lookup and inside display the values "Yes" and "No". After several attempts … Continue reading AX / D365FO – Show “NoYes” Enum field as Combobox instead of Checkbox