How to get Contact Person of Vendor & Customer



How to get Contact Person of Vendor & Customer 


Via below code you can retrieve the contact person list of vendor or customer


class SLD_DemoInstance
{

   
    public static void main(Args _args)
    {

        ContactPerson            contactPerson;
        DirPartyTable       dirPartyTable;
   
        RecId _refRecId= VendTable::find("S00038").Party;
        while select contactPerson
        where contactPerson.ContactForParty==_refRecId
        {
       
            info(strFmt("%1, %2",contactPerson.ContactPersonId,contactPerson.personName()));
        }
    }

}

No comments:

Post a Comment

Virtual Fields Vs Computed Fields

  Virtual Field: A virtual field in D365FO is a field that doesn't have a direct representation in the database. It's a field that y...