Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
Answered

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

(0) ShareShare
ReportReport
Posted on by 29

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.

  • Verified answer
    James Reinhardt Profile Picture
    29 on at
    Re: Dynamics 365 - populate Org Name dynamically, so Org can be set once and used throughout flow

    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.

  • James Reinhardt Profile Picture
    29 on at
    Re: Dynamics 365 - populate Org Name dynamically, so Org can be set once and used throughout flow

    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.

  • v-alzhan-msft Profile Picture
    on at
    Re: Dynamics 365 - populate Org Name dynamically, so Org can be set once and used throughout flow

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Featured topics