Understanding Relation Columns in Extra Tables and REST API Dynamic provider

Hi,

I have an extra table with both Contact (x_mypersonid.mobile) and Company relation columns.

I'm using REST and the dynamic provider to try to get the certain Contact and Company information but I cannot seem to find where these are documented?

For Instance, I want the Contact mobile number and address. I've been able to guess the mobile number which is working, but I cannot work out the address:

for instance in the $select part of the request:

y_mytable.x_mypersonid.mobile/formattedNumber - This is Working

y_mytable.x_mypersonid.address/formattedAddress - This is Not working

Please could you let me know how can I find out the fileds that are avaliable to me?

For instnace I want the Contact address lines, how would I go about that?

I do not want to have to call each archive provider (Person/Contact) for each row in my table, as this would take 100's of API calls, and I assumed this is what the relation columns were for?

Any help would be greatly apprecated!

Cheers

Rich

 

 

RE: Understanding Relation Columns in Extra Tables and REST API Dynamic provider

Hi,

I would assume that if you look at PersonArchiveProvider this would reflect what is available on Dynamic provider as well.

By: Michel Krohn-Dale 22 Jun 2020

RE: Understanding Relation Columns in Extra Tables and REST API Dynamic provider

Michel,

Thanks for this.

I have taken a look, and for instance, the Address Line 1 is defined as: personAddress/line1 but this doesn't work.

Looking at the mobile one i guessed that does work, there seems to be a different naming convention.

In the Person Archive: personMobilePhone/formattedNumber

Working using Contact relation column and the dynamic archive: mobile/formattedNumber

So I tried to apply similar logic (remove person and de-capitalize the first letter) to the Address, and came up with:

address/line1 which does work. 

Do you know if there is any documentation on the exact information for these relation columns?

Cheers

Rich

 

 

By: Rich Hacker 22 Jun 2020

RE: Understanding Relation Columns in Extra Tables and REST API Dynamic provider

Hi,

I have managed to work out the majority of the fields I require with a bit of perseverance.

There are just a couple I'm still struggling with:

1) Getting the Contact Company Name

          y_mytable.x_mypersonid.contact/name (Not working)

2) Getting some Contact Udefs

          y_mytable.x_mypersonid.udef/SuperOffice:78 (Not Working)

Any help with these would be great!

Cheers

Rich

 

By: Rich Hacker 22 Jun 2020

RE: Understanding Relation Columns in Extra Tables and REST API Dynamic provider

Hello Rich,

If 'x_mypersonid' is a person relation, you can do the following:

y_mytable.x_mypersonid.contact_id.name = company name

y_mytable.x_mypersonid.userdef_id.long11 = Person UD Field on long11. Note: Since your using the dynamic archive provider, which basically is building a sql query in netserver, you can't using prog id's here, since there is no knowledge about the mapping ProgId <> column on this level.

By: David Hollegien 22 Jun 2020

RE: Understanding Relation Columns in Extra Tables and REST API Dynamic provider

David,

Thanks so much for comming back to me with this.

This is exactly what I needed and after a quick test this morning, I can confirm it is working perfect!

Many thanks for you assistance with this, it is very much appreciated!

Stay safe,

Rich

 

By: Rich Hacker 23 Jun 2020