Wednesday, March 17, 2021

How get primary email of customer or vendor

Below code is for customer only, for vendor we need to replace CustTable with VendTable.  

dirPartyContactInfoView        dirPartyContactInfoView;

CustTable custTable;

        select firstOnly Locator dirPartyContactInfoView

        order by dirPartyContactInfoView.IsPrimary desc

            where dirPartyContactInfoView.Party == custTable.Party &&

            dirPartyContactInfoView.Type == LogisticsElectronicAddressMethodType::Email;

        

      custAccountStatementExtTmp.CustEmail = dirPartyContactInfoView.Locator;

No comments:

Post a Comment

How get primary email of customer or vendor

Below code is for customer only, for vendor we need to replace  CustTable  with VendTable.   dirPartyContactInfoView        dirPartyContactI...