cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
AnotherRedbeard
Level: Powered On

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
Community Support Team
Community Support Team

Re: Using Get Record Action in Common Data Service

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
Community Support Team
Community Support Team

Re: Using Get Record Action in Common Data Service

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

AnotherRedbeard
Level: Powered On

Re: Using Get Record Action in Common Data Service

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

moizmh
Level: Power Up

Re: Using Get Record Action in Common Data Service

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 325 members 6,871 guests
Please welcome our newest community members: