28 June 2021

How to get the control name in D365FO

 PurchId purchId = purchCreateOrder.design().controlName(formControlStr(PurchCreateOrder,PurchTable_PurchId)).valueStr());

27 June 2021

X++ code to get contact person Vendor/Customer which is specified in the Purchasing demographics AX 2012 / D365 FO

Table relations:

contactPerson.CONTACTPERSONID == VendTable.contactPersonId

DirPartyTable.RecId  == ContactPerson.Party

Below is the single line logic to get it.

 ContactPerson::find(VendTable::find("US-104").ContactPersonId).personName()




How to add the Display method in the form level in D365 F&O

 The below examle is to add the form -Data source level adding display method and assigning to form design control.