cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AnotherRedbeard
Advocate I
Advocate I

Using Get Record Action in Common Data Service

Hi all,

I'm trying to use the 'Get Record' Action from the Common Data Service (CDS) Connector to lookup a record in CDS and then either do an Update or Insert, but I'm having trouble figuring out what to put in the 'Item identifier' section.

 

My flow is a Json object that has the ID in it and I'm parsing that Json and attempting to use the ID to look up the record in CDS.  It is a custom entity and I have made the ID the key.

 

Here is the error I get from Get Record:

"status": 400,
"message": "Invalid value: 1128138 provided for item ID"
 
In the very next step, just to make sure it's there, I have a 'Create Record' action and it returns this error:
"status": 412,
"message": "A record that has the attribute values ID already exists. The entity key ID requires that this set of attributes contains unique values. Select unique values and try again."
 
So I know the record exists, but I can't seem to figure out exactly what to put in that Item Identifier field.  Please help Smiley Happy !
1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @AnotherRedbeard ,

 

Item identifier is similar to GUID, generated automatically, not ID like 1128138 you configured, as below:

43.PNG

If you use the obtained ID value to configure Item identifier field, you cannot get the record.

  • Since you need to find the record by ID, you could configure List records-Filter Query to get the record. ID field has a unique value in Entity, so only one record will be obtained.

 

For example, I created ID field in my entity with a unique value of type Whole Number and set it to Key.

  • Get its Name as shown below, then configure Filter Query.

45.PNG46.PNG

  • Note that if ID field is of type string, you need to enclose it in single quotes.

47.PNG

 

Finally, determine whether there is a record corresponding to ID value in the Entity.

  • Enter "id" in input box when configuring Record identifier, and then select Dynamic content corresponding to Unique identifier for entity instances generated by the system.44.PNG

 

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-bacao-msft
Community Support
Community Support

Hi @AnotherRedbeard ,

 

Item identifier is similar to GUID, generated automatically, not ID like 1128138 you configured, as below:

43.PNG

If you use the obtained ID value to configure Item identifier field, you cannot get the record.

  • Since you need to find the record by ID, you could configure List records-Filter Query to get the record. ID field has a unique value in Entity, so only one record will be obtained.

 

For example, I created ID field in my entity with a unique value of type Whole Number and set it to Key.

  • Get its Name as shown below, then configure Filter Query.

45.PNG46.PNG

  • Note that if ID field is of type string, you need to enclose it in single quotes.

47.PNG

 

Finally, determine whether there is a record corresponding to ID value in the Entity.

  • Enter "id" in input box when configuring Record identifier, and then select Dynamic content corresponding to Unique identifier for entity instances generated by the system.44.PNG

 

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-bacao-msft , that is what I ended up doing and thank you for explaing the record identifier...that makes more sense now.

I was trying the same thing but got the flow working with just specifying the ItemInternalId in "Record Identifier"

 

Annotation 2019-08-14 201145.jpg

 

Hope this helps (others).

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,527)