Monday, November 17, 2025

Logistics Postal Address

    public LogisticsPostalAddress getAddress(PartyNumber partyNumberLogisticsLocationRoleType logisticsLocationRoleType) 

    { 

        LogisticsPostalAddress  address = null; 

        DirPartyLocation        partyLocation; 

        DirPartyLocationRole    partyLocationRole; 

        LogisticsLocationRole   locationRole; 

  

  

  

        select firstonly partyLocation 

            where partyLocation.Party == DirPartyTable::find(_partyNumber).RecId 

                join address 

            where address.Location == partyLocation.Location 

                join partyLocationRole 

            where partyLocationRole.PartyLocation == partyLocation.RecId 

                join locationRole 

             where locationRole.RecId == partyLocationRole.LocationRole 

                        && locationRole.Type == _logisticsLocationRoleType; 

        if(partyLocation) 

        { 

            return address; 

        } 

        return address; 

    } 

  

} 

  

  

 

No comments:

Post a Comment