cancel
Showing results for 
Search instead for 
Did you mean: 

Resource not found for the segment issue in Power Automate/Microsoft Flow

image.png

 

 

 

 

Recently , I have come across this issue with Power Automate while I am trying to create a record using “Create a new record ” action with Common Data Service(Current environment) connector based on some trigger.

 

I am not doing any complex stuff, just creating a quote line record and referencing a quote record. Referencing records is as simple as using dynamic content and populating it to a lookup attribute right !!! No, its not. Let’s see.

 

image.png

 

 

 

I just run the flow with the above setup and flow run got failed with “Resource not found for the segment ‘c262238e-fc89-ea12-ba11-000d3ab615df'”

 

image.png

 

After some digging , found the cause. The new CDS ( Current environment) is the culprit. Issue is with the way of referencing attributes .It expects referenced attribute values in “Odata Id” format i.e

EntityNameInPlural(Record’sId/GUID).

So here in my case, for quote lookup attribute I should give like /quotes/(Record’s Id/GUID).

 

image.png

 

After making the above change, flow has run successfully.

 

The interesting thing is If you use old CDS connector, you wont face this issue. But we cannot be compromised to use old one cause the new connector gives us lot of advantages. Like, option to configure multiple trigger . Read here.

 

If you want to know the difference between CDS vs CDS (Current environment) connectors, refer this excellent article by Sara Lagerquist (MVP)

 

Hope it helps. Original post is from my blog.

 
Comments

Had the same issue. If you want to update a custom entity, don't forget the prefix to get it up and running! 

@SandraSoniec I'm facing the same issue with a custom entity. Can you please advise how to reference it. Please provide a screenshot if possible.

 

Prefix: fsdyn

Custom entity name: Transport Reservation Request

 

Thank you!

@SkiMiquel Entities have a "display name" and "name". My custom entity has the display name "Standards" and name is "mc_standards". All my custom entities have "mc_" as prefix. You have defined your own during creation of your custom entity. You need to use the name for doing the update. Check the name of your entity in the power apps maker portal under Data > Entities > yourEntity. Then follow the instructions for updates.

I have a custom entity with singular display name "My category", plural display name "My categories" and system name "new_my_category".

When I check https://[org].crm.dynamics.com//api/data/v9.0/new_my_category  I get an error, but when I check https://[org].crm.dynamics.com//api/data/v9.0/new_my_categorys it shows the contents of the entity.

 

However, when I set the lookup for 'Category 1' in my flow to /new_my_categorys/[value from other record] the flow gives the segment error. I've tried every combination I can think of, none will work. Can anyone give a tip on how to fix this?

Hey @Bluebug 

I believe I had a similar issue.

My look up field is 

- Display Name: Business Unit

- Name : prefix_BusinessUnit

 

And in the flow I have entered

/businessunits/{guid}

so it is the displayname in plural and in lower case and without spaces

@yamnjjt I fixed the issue by setting the fields to /[EntitySetName]([DynamicField]) or [EntitySetName]/[DynamicField] where I found it worked if I used the former for my custom entities and the latter for default entities such as Accounts. I didn't proceed testing if it's possible to interchange the formats for custom and default entities, as I was too happy to finally get this working 😀

Having the same problem with a custom entity but no matter what format I try, it can't seem to find it. Ugh...

Thank you for posting the solution to this. My situation was very similar. In my case, I was pulling the record ID into a variable and placing that in the field as dynamic content thinking "Well it is asking for a GUID, so this should work." It did not work and ended up being very confusing. I was trying to update a field whose LookUp was to the systemusers entity. Using the above suggestion of appending /entityname/(variable with GUID), I was able to get it working:
image.png

 

Something I noticed is even if you aren't creating a flow within a solution, this is still needed if you choose "Current Environment" in the trigger:

 

image.png

I chose this because I plan on adding the flow to a solution in the future. Hope this helps others who may be in a similar boat. 

I just got this working using a Virtual Entity for SCM for sales order lines.  I tried many combinations of the slashes and parentheses as described in this blog and the one linked from Sara Lagerquist.  What finally worked for me was this: 

1) Be sure to use the prefix for the virtual entity mserp_

2) Be sure the entity name is case sensitive.  I got the exact value from the Odata result from the prior step where I created the sales order header.  (mine showed as all lower case, including the v in 'v2'!)

3) the name of the entity is certainly plural in English, 'entities' in my case, not 'entitys'.  Again, I got the exact spelling by looking at the OData output from the prior step on a test run.

4) I used a forward slash in front

5) I used parenthesis around the dynamic data from the prior step for the "unique identifier for entity instances".  Don't pick the variable with the normal name for the field by accident!

 

So, my step to create the virtual entity Sales Order Lines V2 looks like this: 

Blog post.png

Meet Our Blog Authors
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • Cambridge UK Power Platform User Group Leader, Technical evangelist and speaker. Always says yes to coffee! #LetsGetCoffee
  • Passionate #Programmer #SharePoint #SPFx #Office365 #MSFlow | C-sharpCorner MVP | SharePoint StackOverflow, Github, PnP contributor
  • I am building business processes and applications that are easy for users' to stick to, so they can follow and understand them. In overall I transform processes to be more reliable and effortless. I am a proud co-organizer of SharePoint Saturday Warsaw and active community member, blogger and international speaker.