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

Dynamics 365 - populate Org Name dynamically, so Org can be set once and used throughout flow

I have a flow with many steps that connect to a D365 CRM Org ("DevOrg1"). When I move this solution to another environment, I need to change the Organization Name to that environment ("ProdOrg1"). The connection stays the same, but the Org is different.


What I would like to do, is declare the Org Name as a variable at the beginning of the flow, and use that value as a custom value in each D365 step. There's too much room for error when manually updating each step to point to the new connection. I have tried the GUID of the org, as well as the text value of the Org name, but neither worked.


Does anyone know what value should be used? There's obviously more going on behind the scenes that I'm unable to replicate.

1 ACCEPTED SOLUTION

Accepted Solutions
Frequent Visitor

I think I've found the solution, but need to test it out a bit to be sure. Rather than use the "Dynamics 365" steps which require a specific organization be specified, I used a "Common Data Service" step, which has an option for "Current" environment. It appears that these steps are aware of the environment that the solution is in and wouldn't require declaring the specific Org at all.

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @jamesreinhardt ,

 

You could initial a string variable in the begainning of the flow, and insert the Organization Name in the variable, then you could use the variable value in the following steps, so every time when you want to change the Organization Name for different environment, you just need to update the value for the string variable.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the reply, but unfortunately that didn't work. It appears that the 'selector' is doing more than just giving the step the string of the Org Name. Unfortunately I don't have a way to peek at that part of the code to see exactly what is being passed in.

 

I might try using one of the CDS steps and see if that behaves any differently.

Frequent Visitor

I think I've found the solution, but need to test it out a bit to be sure. Rather than use the "Dynamics 365" steps which require a specific organization be specified, I used a "Common Data Service" step, which has an option for "Current" environment. It appears that these steps are aware of the environment that the solution is in and wouldn't require declaring the specific Org at all.

View solution in original post

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (5,333)