We’ve developed some resources to help you work effectively from home during COVID-19 Click to learn more

Using REST API to get Contact and Person addresses from Extra Table Relation Columns

Hi,

I have a Service Extra table (y_aisinstallations) with Customer and Contact Relation columns (x_installerContactId and x_consumerPersonId)

I want to get the Address for each of these using Rest API with the fewest calls possible.

I was hoping I could do somthing like this: x_installerContactId.formmatedAddress, but I think I'm right to assume you can only select the actual columns from the relevent database table?

I was thinking I could do somthing like this using the dynamic provider:

dynamic?$select= address.owner_id.(y_aisinstallations->x_consumerpersonid).city

But this doesn't seem to work.

 

In summary, I have come up with the following:

1) Load all the records I want from my Extra Table (y_aisinstallations)

2) Load Company Addresses: Get a list of all the contactId's and then call GetContactList (Contact Agent) and use Address.FormmatedAddress

3) Load Person Addresses: Get a list of all the peronId's and do the same as above. However, the Address is not included with the call to GetPersonList. This led me to assume I would have to call GetAddress (Person Agent) for each record?

 

Is this, in any way, a valid way to do this or am I way off the mark? Any help or suggestions would be greatlyt apprciated!

Cheers

Rich

 

 

RE: Using REST API to get Contact and Person addresses from Extra Table Relation Columns

Hi Rich! 

There's a pretty extensive discussion about this same type of query in another forum post. Could you give that discussion a view and see if that's able to answer your question?

Best regards.

Av: Tony Yates 15. jun 2020