Wednesday 24 February 2016

job to find the primary address for the customer

static void JobtofindprimaryAddress(Args _args)
{
    CustTable           custTable;
    str                 name;
    str                 address;
    str                 primaryAddress;
    ;
    custTable = CustTable::find("UPNR003", false);
    name = DirParty::primaryPostalAddress(custTable.Party).displayLocationDescription();
    address =  DirParty::primaryPostalAddress(custTable.Party).Address;
    if(!address)
    {
        info("no address found");
    }
    info(strFmt("name: %1", name));
    info(strFmt("adress: %1", address));
}

No comments:

Post a Comment

intercompany PO multiple product receipt by x++

public void processStampICPO(PackingSlipId _deliveryNote,                             Transdate _deliverydate,                             ...