cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shidin
Frequent Visitor

Dynamics 365 - Get URL dynamically in flow

Hi, 

 

I am using Flow with Dynamics 365 to build out a Quotes Approval Process.

In the 'Item Link' textbox on the Approvals step, I am concatenating the 'CRM tenant name' and the Quote GUID so that the user can get a link to the Quote record. (see screenshot below)

ApprovalsDyn365.png

 

  1. As you can see, I have hardcoded the Dynamics 365 URL and only the Quote GUID is dynamic.
    How can I get the Dynamics 365 URL in the flow? 
    Looking for something similar to what 'formContext.context.getClientUrl()' does in a web-resouce in Dynamics 365.
  2. When is the recommended or the best way to 'deploy' this flow to my Production tenant?

 

Thanks in advance

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuazh-msft
Community Support
Community Support

Hi @Shidin

 

For your first question:

I afraid that the only way should be hardcoded the Dynamics 365 URL and I couldn't find any to get the Dynamics 365 URL in flow.

 

For your second question:

Are you creating the flow in another tenant instead of the Production tenant?You could take a try to export the flow to see if it could copy the flow to Production tenant, if not, please manually create the flow on Production tenant.

 

Best regards,

Alice

View solution in original post

4 REPLIES 4
v-yuazh-msft
Community Support
Community Support

Hi @Shidin

 

For your first question:

I afraid that the only way should be hardcoded the Dynamics 365 URL and I couldn't find any to get the Dynamics 365 URL in flow.

 

For your second question:

Are you creating the flow in another tenant instead of the Production tenant?You could take a try to export the flow to see if it could copy the flow to Production tenant, if not, please manually create the flow on Production tenant.

 

Best regards,

Alice

View solution in original post

For 1, What I ended up doing was adding my Dynamics instance URL as a configuration record (custom entity) and then use the 'Dynamics 365 - Get records' action to query for that particular record.

 

 

 

You can do following - 

e.g -My full link is as below, but my last underlined portion only will be dynamic.

 

https://orgf5f2b738.crm5.dynamics.com/main.aspx?appid=f9c14c95-affc-e811-a97d-000d3aa0f171&pagetype=...64cfa3e5-0c06-e911-a97f-000d3aa0f171

 

For the underlined dynamic part, Please add - Unique identifier for enetity instances from dynamic content. 

klemetsrud
Frequent Visitor

If anyone is using the CDS Current Environment now instead of the dynamics 365.

 

The odata.id for a given record gives you the url, entity name, and ID, you would just need to parse it out.

 

Example: substring(outputs('Create_a_Copy_of_Updated_Contract_Inspection')?['body/@odata.id'], 0, indexOf(outputs('Create_a_Copy_of_Updated_Contract_Inspection')?['body/@odata.id'],'/api/'))

 

 

Replace the 'Create_a_Copy_of_Updated_Contract_Inspection'  with whatever the step name is that you want to get the URL from. That at least gives you a string that gives you the Dynamics 365 url. That being said, i'm still working on getting the entity name and ID out of there to construct a link to the actual record 😉

 

I know the CRM connector has a record url it returns, but CDS does not 😞

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,241)