Hi all,
I'm just starting to get to grips with making API calls to Creatio and stuck trying to POST a new record, where a column is a lookup.
I understand that I can post using the Guid to the lookup using column name "UsrLookupNameId". However, if I don't have the Id but only a value in one of the Lookups column, is that possible?
For example, I have the lookup UsrNationality, but I only have the value "Germany" and not the ID. Or, must I first make a GET request to get the ID?
Here is current code:
{
"UsrName": "Test Name",
"UsrNationality": "Germany"
}
Any help much appreciated :)
Like
Hi Harry,
You would have to first do a GET to the lookup object to get the record where the Name = "The name", then do the POST separately using the Id value for the lookup column. So two separate calls, one to GET the lookup and a second to POST the new record.
Typically when I have code working with Creatio's API's I retrieve the needed lookups into a local cache to avoid repeatedly doing GETs to the lookups.
Ryan