Community
Showing results for 
Search instead for 
Do you mean 
Reply

Contacts Entity Custom Fields

Accepted Solution Solved
Bronze Elite Contributor
Posts: 2,109
Country: United_Kingdom
Accepted Solution

Contacts Entity Custom Fields

[ Edited ]

Hi using API v1.08 against the act2016demo dB for testing. I've attached a txt with the response.

 

We have created a new custom character field in Contacts called simply "Test Field 1" but when we do a GET on either /api/Contacts or /api/metadata/fields we do not see the field listed anywhere.

 

To test we updated the system User1 field to have a value of "test" and the next get against a specific contactID we can see the new updated value for that field, but we still do not see the custom field. We wanted to make sure we weren't pulling cached data.

 

Next we tried updating the new custom field via the Act! application to hold a value "test again", but still we do not see the field available.

 

When we test against a dB that we know has many custom fields, we can see existing custom fields, but cannot see any new fields we add.

 

Is the API caching meta/schema data and so changes to the schema are only seen after a period of time?

 

Could someone please check and confirm either way? TIA.

 

Pictures:

TestFieldsInAct.PNGCustom test fields in Act! with test values added.

 

Request URL

http://act.caldere.com/Act.Web.API/api/metadata/fields?recordType=Contact

 

 

 

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog

Accepted Solutions
Solution
Accepted by topic author vivek
‎09-13-2016 08:24 AM
Employee
Posts: 219
Country: USA

Re: Contacts Entity Custom Fields

That's correct Vivek, there's caching going on in Web API.  Currently it's overly aggressive due to a side effect, but what we are leaning towards is the following:

 

Any authentication call (be that via credentials or token refresh) would refresh all metadata.  

 

So under normal flow, metadata would be cached ~an hour or so (as that is the current allowed time we accept a token without refresh), but you could refresh simply by refreshing a token at any time.

 

Would that work?

 

In the meantime, the alternative is to recycle the app pool I'm afraid.

 

View solution in original post


All Replies
Solution
Accepted by topic author vivek
‎09-13-2016 08:24 AM
Employee
Posts: 219
Country: USA

Re: Contacts Entity Custom Fields

That's correct Vivek, there's caching going on in Web API.  Currently it's overly aggressive due to a side effect, but what we are leaning towards is the following:

 

Any authentication call (be that via credentials or token refresh) would refresh all metadata.  

 

So under normal flow, metadata would be cached ~an hour or so (as that is the current allowed time we accept a token without refresh), but you could refresh simply by refreshing a token at any time.

 

Would that work?

 

In the meantime, the alternative is to recycle the app pool I'm afraid.

 

Bronze Elite Contributor
Posts: 2,109
Country: United_Kingdom

Re: Contacts Entity Custom Fields

Ahh ok cool, we were beginning to doubt our sanity!

 

Schemas aren't changed that often and with that workaround of refreshing the token, we just add it to any meta request or login routine.

 

Thanks for replying so promptly!

 

 

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog