Monday, August 19, 2019

Find Customer Address

static void FindCustomerAddress(Args _args)
{
     CustTable custTable;
    DirPartyTable dirParty;
    LogisticsElectronicAddress electronicAddress;
    DirPartyLocation dirPartyLoc;

    //find the customer
    custTable = CustTable::find("C-00016");
    //find the party for the customer
    dirParty = DirPartyTable::findRec(custTable.Party);

    //find all of the contacts for the current customer
    while SELECT  * FROM electronicAddress
    EXISTS JOIN * FROM dirPartyLoc
    WHERE electronicAddress.Location == dirPartyLoc.Location && dirParty.RecId==dirPartyLoc.Party
    {
        info(electronicAddress.Locator);
    }

}

No comments:

Post a Comment