Question

Cannot convert the literal to the expected type 'Edm.Guid'

Hello all,
What I'm trying to achieve is to find a way to create new record in one of my Custom tables utilizing OData.
Have found this post usefull, but still not really there... https://community.creatio.com/questions/cannot-convert-primitive-value-…

The story: 
As above, need to create new record in, lets say CustomTableA. My table is with couple of mandatory columns and in between the others, two of which are of a lookup type, and to make it a bit more funny both are references to other custom tables, lets say B and C.

The issue I'm facing is as ihe subject - Cannot convert the literal '0000....00' to the expected type 'Edm.Guid'

Below are already tested options, trying to use Postman at the moment. Would appriciate any advice/guidience?
Obviosly trying to POST this to ... /0/odata/CustomTableA.

Please help, and thank you in advance.

"CustomTableBId": "000000",
"CustomTableCId": "000000",

"CustomTableBId": "guid000000",
"CustomTableCId": "guid000000",

"CustomTableBId": "guid'000000'",
"CustomTableCId": "guid'000000'",

"CustomTableB": {"Id": "000000"},
"CustomTableC": {"Id": "000000"},


"CustomTableB": {"Id": "guid000000"},
"CustomTableC": {"Id": "guid000000"},

"CustomTableB": {"Id": "guid'000000'"},
"CustomTableC": {"Id": "guid'000000'"},

Like 0

Like

1 comments

For creating a record via POST you only need to provide the guid in the payload as: 

"UsrMyLookupColumnId": "ddb65043-b662-4762-9a0a-6f325f65ad03"

However, is the value you're passing a guid? It's not "000000" but a real guid ID value, correct? Can you post what your payload looks like?

Show all comments