AX / D365FO – Get Customer Primary email address, phone, fax, Website url

To get the Customer Primary contact informations like e-mail address, phone number, web site url and fax number you can use these 4 methods

str mail, phone, fax, webSite;

//Get Customer Email
mail = CustTable::find('1234').email();

//Get Customer Phone
phone = CustTable::find('1234').phone();

//Get Customer Fax
fax = CustTable::find('1234').telefax();

//Get Customer WebSite
webSite = CustTable::find('1234').url();

Leave a comment