Thursday, 11 June 2015

Re- Use Jobs for Reference

Get all Customer Postal Address

static void CustPostalAdresses(Args _args)
{
    CustTable custtbl;
    LogisticsPostalAddress  postalAddress;
    DirPartyLocation partyLocation;
    custtbl =   CustTable::find("US-001",false);
   while  select  postalAddress
    exists join partyLocation
        where partyLocation.Location == postalAddress.Location
        //&& partyLocation.IsPrimary == true
        && partyLocation.Party == custtbl.party
    {

    info(strFmt("%1",postalAddress.RecId,postalAddress));
    }
}

No comments:

Post a Comment