cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jamesreinhardt
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
jamesreinhardt
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
v-alzhan-msft
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.

jamesreinhardt
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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (21,809)