I am creating a script that needs to get the contacts associated to a company. The script needs to work for both Customers and Vendors.
You can attach a Contact to a Customer or Vendor from the record screen and by doing this you can attach a Contact with an empty Company field.
I can use the sublist contactroles if it is a Customer record but that sublist is not available for the Vendor record.
Is there a way to get the contact records via search? So using the screenshot above can a search get the following contacts: Aiden Somerhalder, Alex Wolfe and Gerrom Test Contact.