cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: Dynamics 365 - Get URL dynamically in flow

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

Re: Dynamics 365 - Get URL dynamically in flow

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

Highlighted
Frequent Visitor

Re: Dynamics 365 - Get URL dynamically in flow

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.

 

 

 

Highlighted
New Member

Re: Dynamics 365 - Get URL dynamically in flow

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. 

Highlighted
Regular Visitor

Re: Dynamics 365 - Get URL dynamically in flow

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,503)