Hi,
Get Sales Order Address in dynamics 365 F&O X++
https://rahulmsdax.blogspot.com/2019/08/get-sales-order-address-in-dynamics-365.html
find phone and contact person in the contact information
public str phonePersonName(SalesTable _salesTable)
{
LogisticsElectronicAddress electronicAddress;
electronicAddress = DirParty::primaryElectronicAddress(CustTable::find(_salesTable.CustAccount).Party, LogisticsElectronicAddressMethodType::Phone);
if (!electronicAddress)
{
electronicAddress = DirParty::getElectronicAddressForPartyPostalAddress(CustTable::find(_salesTable.CustAccount).Party, LogisticsElectronicAddressMethodType::Phone);
}
return electronicAddress.Description;
}
display Phone phone()
{
LogisticsElectronicAddress electronicAddress;
electronicAddress = DirParty::primaryElectronicAddress(this.Party, LogisticsElectronicAddressMethodType::Phone);
if (!electronicAddress)
{
electronicAddress = DirParty::getElectronicAddressForPartyPostalAddress(this.Party, LogisticsElectronicAddressMethodType::Phone);
}
return electronicAddress ? electronicAddress.Locator : '';
}
Comments
Post a Comment