Use strUpr to convert string in upper case in x++ info(strUpr('abc')); This returns ABC
Category: X++
AX / D365FO – How to do an Inventory recalculation for on-hand Qty
Sometimes you may see some discrepancy in InventSum table for any item then you may need to recalculate inventsum for particular item. You can try in 2 different ways : With D365FO User Interface With X++ code With D365FO User Interface Go to System administration > Consistency check Choose : "Inventory management" Module Just do … Continue reading AX / D365FO – How to do an Inventory recalculation for on-hand Qty
AX / D365FO – X++ exception handling
Nice post that explains hoew to manage exceptions in X++ : https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/dev-ref/xpp-exceptions
AX / D365FO – Get Current Company in AX
static void curExtExample(Args _arg) { str curCompany; curCompany = curExt(); //This gets the current company }
AX / D365FO – Send email in X++ using email templates
Nice post that describes how to send e-mails using e-mail templates : https://dynamicsaxinsight.com/2019/01/30/d365-send-email-in-xpp-using-email-templates/
AX / D365FO – Convert UTCDateTime to Date
In this example I will convert UTCDateTime type into Date type date myDate = DatetimeUtil::Date(MyUTCDateTime)
AX / D365FO – Set a default value of a table field when creating a new row
To set a default value of a table field just use the initValue() method of the table [ExtensionOf(tableStr(CustTable))] final class CustTable_Table_Extension { void initValue() { next initValue(); this.yourField = 1234 //set your new custom field's default value. }
AX / D365FO – Get current user email
Get the current logged user e-mail UserInfo userInfo; str email; select firstonly userInfo where userInfo.Id == curUserId(); email = userInfo.networkalias
AX / D365FO – Split string into Array
I have a text that which contains comma separated values and I want to insert values into an array. You can use strSplit() method to do this public void splitString(str _splitString) { List strlist = new List(Types::String); ListIterator iterator; str _Value; strlist = strSplit(_splitString,”,”); iterator = new ListIterator(strlist); while(iterator.more()) { _Value = iterator.value(); iterator.next(); } … Continue reading AX / D365FO – Split string into Array
AX / D365FO – Creating Email Body with Dynamic Table (with Docentric free edition)
With Docentric AX Free Edition you can: use an advanced HTML editor to format email bodies within D365FO, pick a placeholder from a list of available placeholders for the current email, if you need to create a dynamic email body. Read this article to learn how : https://ax.docentric.com/improved-email-templates-creating-email-body-dynamic-table/?toolbarclose=yes