Maybe I'm missing something, but I want to do a search that returns both the specific customer record plus the primary contact information based on a known customer record ID.
Seems the only information regarding the primary contact is the text-based 'primarycontact' field which is not searchable for a unique primary record (could be redundant).
a) I know there is an undocumented field in the contact records called 'contactrole' which can be set to -10 to set it as the primary role contact. There does not seem to be a join ability with primary contact (would be nice for something like returnColumn('phone','primarycontact') ), but is it possible to do a sub-search that filtered on company ID and 'contactrole', or is this unsupported. I ask because 'contactrole' is not listed in the documentation and do not want to create an unsupported search.
b) Is there another field in the customer record that identifies the primary contact's contact record ID? This would make life a little bit simpler since we could at least just directly load the contact record with this ID to read in the values desired (e.g. email, phone, first, last).
Ideally, as mentioned in 'a', it would be great if there was a join capability to the primary contact record of the customer record(s) being searched.
Again, am I over complicating this and there is an easy way I'm not aware of?
Thanks
-Steve