Tuesday, February 18, 2020

How to Get the legal entity(current company) address in D365 / AX 2012 based on the Address Type

Below is the piece of code will return the current company address based on role type.



LogisticsAddressing  address;
    
    ;
    
    address = DirParty::findPostalAddressByRole(CompanyInfo::current(), LogisticsLocationRoleType::RemitTo).Address;

    info(address); 


@Rahul

1 comment:

What is the primary purpose of using a Solution in Microsoft Power Platform & ALM?

As organizations embrace low-code development with Microsoft Power Platform , it becomes essential to manage and govern apps, flows, and dat...