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

Updating Quote status from Draft(when quote is created in dynamics) to Won(from PowerApps button) in Dynamics 365

Hey, @Pavlos 

This is Praneetha. I went through the reply you have given for a question posted on "Updating status in dynamics using Flow"

My project has 3 screens:

1st screen :  A login scrren where customer enters 'Quote id' to login

2nd screen: View quote details and pdf of quote details

3rd screen : Pdf viewer control.

 

i have two buttons : Accept - which changes the draft 'Status Label' of quote to Won

                                 Reject - which changes the draft 'Status Label' of quote to Close

 

If i have to create flow? how do i do it?

should i create two different flows for 2 button?

 

Regards

Praneetha

 

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Pavlos
Frequent Visitor

Hi @praneethapradee

 

I guess you are referring to my reply to an old issue with the Dynamics Connector right? 

 

I don't think you would need two Flows. Remember you can place conditions in PowerAutomate. Can you do the following:

 

1. Create a flow from your PowerApp - the same Flow you can use on both buttons. See how I did it where I have two variables: record ID and the second variable I just use to pass Yes / No or in your case Accept / Reject 

image 1.png

2. The important part here is to start with a condition - doing that will allow the Flow to realise what button the user clicked on. See in my case I say if it is equal to Yes then do the Yes branch. You can see there is a No branch you can use for Reject Quote 

image 2.png

 

3. Here make sure you use the update Record action - place your cursor in the Record Identifier field and in the Dynamic Table click on "Ask in PowerApps" this generates the variable

image 3.png

 

4. Click on advance options and scroll down - make sure you update both Status reason and status value.

image 4.png

 

Hope this helped. Ping me if you need more help!!!

 

Enjoy!

Pavlos

View solution in original post

hi @praneethapradee 

 

Good progress. 

 

Yes you have to use two buttons - what I said though is to use one / same from for those two buttons. Ok have a look below and hope that will help. 

 

In terms of initiating your Flow - a) select the button, b) go to the Action tab and having the OnSelect property selected click on PowerAutomate 

 

As you can see a new Window will appear where you can either select a Flow or create a new one (click on new one). Once you click on it, it will open a new tab in the Browser with PowerAutomate where you will create your flow. Once you save the flow and go back to the PowerApps tab you will see you new Flow listed there (see the screenshot below I have two Flow already available to use)

image 2.png

 

The record identifier - you can get that from the Gallery you are using to surface the Quotes. Arent you using a gallery in the first screen where the user selects the quote they need to update?

 

Hope that helps,

Pavlos

View solution in original post

5 REPLIES 5
Pavlos
Frequent Visitor

Hi @praneethapradee

 

I guess you are referring to my reply to an old issue with the Dynamics Connector right? 

 

I don't think you would need two Flows. Remember you can place conditions in PowerAutomate. Can you do the following:

 

1. Create a flow from your PowerApp - the same Flow you can use on both buttons. See how I did it where I have two variables: record ID and the second variable I just use to pass Yes / No or in your case Accept / Reject 

image 1.png

2. The important part here is to start with a condition - doing that will allow the Flow to realise what button the user clicked on. See in my case I say if it is equal to Yes then do the Yes branch. You can see there is a No branch you can use for Reject Quote 

image 2.png

 

3. Here make sure you use the update Record action - place your cursor in the Record Identifier field and in the Dynamic Table click on "Ask in PowerApps" this generates the variable

image 3.png

 

4. Click on advance options and scroll down - make sure you update both Status reason and status value.

image 4.png

 

Hope this helped. Ping me if you need more help!!!

 

Enjoy!

Pavlos

Hey thanks for the reply @Pavlos 

This is my screen below:

this is my screen. I think ill have to use 2 buttons where accept changes draft to won and reject changes draft to closethis is my screen. I think ill have to use 2 buttons where accept changes draft to won and reject changes draft to close

 

i created the flow u asked me to:

but i have the following doubts?

1. I have 2 buttons and not one button like u said yes/no

2. what is my record identifier?

3. Can i please know the exact flow command for this action?

 

flow.PNGflowww.PNGfloww.PNG

I do not undetsand how to type in the Flow.run(....)

Please help!

 

Regards

[Praneetha

hi @praneethapradee 

 

Good progress. 

 

Yes you have to use two buttons - what I said though is to use one / same from for those two buttons. Ok have a look below and hope that will help. 

 

In terms of initiating your Flow - a) select the button, b) go to the Action tab and having the OnSelect property selected click on PowerAutomate 

 

As you can see a new Window will appear where you can either select a Flow or create a new one (click on new one). Once you click on it, it will open a new tab in the Browser with PowerAutomate where you will create your flow. Once you save the flow and go back to the PowerApps tab you will see you new Flow listed there (see the screenshot below I have two Flow already available to use)

image 2.png

 

The record identifier - you can get that from the Gallery you are using to surface the Quotes. Arent you using a gallery in the first screen where the user selects the quote they need to update?

 

Hope that helps,

Pavlos

Hey, 

Thanks a lot @Pavlos 

I got the solution and your explanation was a big help.

 

I was also able to use the patch function...

 

Patch(Quotes, First(Filter(Quotes, 'Quote ID' = quoteinput.text)), {'Status Label' : "Won"})

 

similarly for the reject button.

 

Regards

Praneetha.

@praneethapradee thanks for sharing the patch formula - good thinking. 

 

I had an issue with using it previously when working with statuses. 

 

Glad that it worked for you!

 

 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (1,620)