cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helpful
Level 8

Problem with Create a new record from Common Data Service (current environment) connector

Hi All,

I was trying to use the Create a new record action from the new connector and am getting an error whenever trying to add a relationship value.

For example, when adding a new Expense that has a lookup field to Currency.  When I supply the CurrencyId (GUID) to the field of the Expense I get an error:

"code": "0x0",
"message": "Resource not found for the segment '[MY_GUID]'.",

Where [MY_GUID] is the actual Id.  This happens for every type of field that is a relationship.  If I use the old Common Data Service "Create a new record" action it works just fine.

1 ACCEPTED SOLUTION

Accepted Solutions
Oswin
Level: Powered On

Re: Problem with Create a new record from Common Data Service (current environment) connector

After some investigation of what's going on behind the scenes in comparison to the regular Common Data Service connector I saw that previously 

"item/_transactioncurrencyid_value" : "YOUR_GUID"

was used to populate the lookup in the API call, this requiring only the GUID of the currency to be filled in as a parameter in Flow. Now with the current environment this changed to

"item/TransactionCurrencyId@odata.bind": "/transactioncurrencies(YOUR_GUID)"

Sadly, at the moment the "/transactioncurrencies(" and ")" are not added to the API call when you simple add a GUID field as parameter for your action. So, the solution for now (expecting this to be solved as a bug soon), is to manually add these two parts in your lookup field to make the API call valid.

currency.PNG

View solution in original post

6 REPLIES 6
v-zhos-msft
Level 10

Re: Problem with Create a new record from Common Data Service (current environment) connector

Hi @Helpful ,

Could you please share a screenshot of your flow's configuration?

As you said when you Created a new record with the new connection, the error occurred.

So please make sure the new connection has the permission to the entity you want.

Best Regards,

Community Support Team _ Zhongys

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

Highlighted
Helpful
Level 8

Re: Problem with Create a new record from Common Data Service (current environment) connector

Thanks, @v-zhos-msft,

I have since reconfigured to use the existing CDS "Create a new record" action.  In my post I was referring to the new CDS connector called "Common Data Service (current environment)".  Announced here:  https://us.flow.microsoft.com/en-us/connectors/shared_commondataserviceforapps/?slug=common-data-ser...

I used that connector for the Trigger event, as well as a Get record action in the Flow, however, when it came time to Create a record it got wierd.

I'm not going to spend too much time on it because the info seems pretty limited.  Even the documentation link in that anouncement goes to a 404 page.

Oswin
Level: Powered On

Re: Problem with Create a new record from Common Data Service (current environment) connector

After some investigation of what's going on behind the scenes in comparison to the regular Common Data Service connector I saw that previously 

"item/_transactioncurrencyid_value" : "YOUR_GUID"

was used to populate the lookup in the API call, this requiring only the GUID of the currency to be filled in as a parameter in Flow. Now with the current environment this changed to

"item/TransactionCurrencyId@odata.bind": "/transactioncurrencies(YOUR_GUID)"

Sadly, at the moment the "/transactioncurrencies(" and ")" are not added to the API call when you simple add a GUID field as parameter for your action. So, the solution for now (expecting this to be solved as a bug soon), is to manually add these two parts in your lookup field to make the API call valid.

currency.PNG

View solution in original post

Helpful
Level 8

Re: Problem with Create a new record from Common Data Service (current environment) connector

Bravo!  Just got back from vacation, tried this and it works as you spec'd.

Sadly, this means my Create action will break as soon as the bug is fixed, but this gets me using a single connection type for the flow.  Much appreciated.

anttipajunen
Level: Powered On

Re: Problem with Create a new record from Common Data Service (current environment) connector

I'm chiming in on this thread as I've been going over the issue myself, with other MVPs and with the product team. This is currently by design. The CDS (current environemnt) connector expects the referenced attribute values in the form of OData id (entity-name(record-id)).

 

I realize digging for the entity names may sometimes be a bit of work, especially as core CE, PSA and FS have differences in how entities are named. There is a way to dig out an entity name from a "Get records" action to hopefully help with this a bit. I'm working on a post around this and will update this thread with a link in the near future.

Edit:
https://daytodaydynamics365.com/referencing-records-when-using-the-common-data-service-current-envir...

Mick282
Level: Powered On

Re: Problem with Create a new record from Common Data Service (current environment) connector

Thanks for the video. It was really helpful. 

 

So the MS product team confirmed that the annoying additional step to create a compose is by design and they won't be changing it? 

 

That's a bit disappointing since I was looking forward to using the new CDS connector but this one area seems to be a downgrade.

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: 170 members 5,677 guests
Please welcome our newest community members: