How do i find a customer's primary address? I tried it two different ways. The code didn't even compile both ways, so I commented the lines.
static void Jobxx_findprimaryAddress(Args _args)
{
CustTable custTable;
DirPartyTable dirPartyTable;
DirPartyAddress dirPartyAddress;
;
custTable = CustTable::find("ABCD", false);
//first way
//dirPartyAddress = dirPartyAddress::findPrimaryAddress(custTable.PartyId);
// second way
dirPartyTable = DirPartyTable::find(custTable.PartyId);
//dirPartyAddress = dirPartyAddress::findPrimaryAddress(dirPartyTable.PartyId);
info(strFmt("Street: %1", dirPartyAddress.parmStreet());
}
*This post is locked for comments
I have the same question (0)