Skip to main content

Notifications

Dynamics 365 Community / Forums / Sales forum / Starting a flow of Pow...
Sales forum
Answered

Starting a flow of Power Automate when entering in an Opportunity

Posted on by 448

Hi all,

It's possible to start a flow of Power Automate every time that user is entering in an Opportunity?
If yes, can somebody indicate me some example?

Thanks in advance

  • Verified answer
    Pradeep Rai Profile Picture
    Pradeep Rai 5,490 Super User 2024 Season 2 on at
    RE: Starting a flow of Power Automate when entering in an Opportunity

    Hi,

    1. For creating custom fields: https://www.gestisoft.com/blog/how-to-add-fields-in-microsoft-dynamics-365

    2. add below function onload

    function onLoad(executionContext)
    {
    var formContext=executionContext.getFormContext();

    var fieldValue=formContext.getAttribute("<add logical name of newly created field>").getValue();

    formContext.getAttribute("<add logical name of newly created field>").setValue(!fieldValue);

    formContext.data.entity.save();

    }

    3. Power Automate: add field below highlighted part:

    pastedimage1673546549596v1.png

    Thank You,
    Pradeep Rai.

    Please mark the answer VERIFIED, if it helps.

  • DiePic Profile Picture
    DiePic 448 on at
    RE: Starting a flow of Power Automate when entering in an Opportunity

    Thanks for reply Pradeep Rai

    can you indicate me some link with examples please or some where I can find a detailed lesson about?

  • Suggested answer
    Pradeep Rai Profile Picture
    Pradeep Rai 5,490 Super User 2024 Season 2 on at
    RE: Starting a flow of Power Automate when entering in an Opportunity

    Hi,

    Entering means user open the opportunity manually, if yes then you need to create one field Two Options then with javascript you can update the values by toggling them with form onload event.

    and on update of this field you can run power automate.

    Other way, is on create of opportunity you can write power automate.

    Thank You,

    Pradeep Rai.

Helpful resources

Quick Links

Dynamics 365 Community Update

Welcome to the inaugural Community Platform Update. As part of our commitment to…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Community Spotlight of the Month

Kudos to Mohana Yadav!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,115 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 227,971 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans