cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MartinVargas
Helper IV
Helper IV

Send order in a single email through a Flow

Hi community, I am having a hard time implementing my flow. It happens that for every OrderLine that I add, the mail is sent immediately. 

 

Basically what I'm looking for is that when all the order lines have been added and the "Submit" button is clicked, the order along with its order lines are mailed out. 

 

This is an example of an order with its respective order lines.

MartinVargas_0-1637812826611.png

 

This is my flow:

MartinVargas_1-1637812844013.png

MartinVargas_2-1637812855519.png

MartinVargas_3-1637812927524.png

 

 

Can anybody help me out here?

Cheers folks.

10 REPLIES 10
rampprakash
Community Champion
Community Champion

Hello @MartinVargas,

 

Based on your requirement there are 2 ways we can implement the same.

 

Register Flow as HTTP Request and Pass Order ID as Parameter from Dataverse using SUBMIT button

 

This Link will help you : https://www.inogic.com/blog/2019/10/how-to-run-microsoft-flow-through-custom-ribbon-button-using-htt...

 

Note : in this Link they are passing name as Parameter but you need to Pass ORDER ID as parameter.

Then Use Get Row using Order ID.

Then List Rows to Get Order Line Items.

 

2. Create a Field in Order Called TRIGGER PROCESS with YES/NO Field.

Create a Flow For Update Operation like below

rampprakash_0-1637817471178.png

 

Then Make a Condition 

If(booleanField = Yes) then Process it.

 

That's it 🙂 If you need any more help, let me know the same

 

Please mark as Answer if it is helpful and provide Kudos


Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com

 

 

MartinVargas
Helper IV
Helper IV

Hi @rampprakash  thanks, I got a bit lost with option 2, could you provide an example please.

 

Note. So when submit is pressed should the column "booleanField" be activated?

rampprakash
Community Champion
Community Champion

Hello @MartinVargas,

 

Yes your understand is correct.

 

(Eg)

 

Consider the field name as new_booleanfield

 

On Click of a button --> formContext.getAttribute("new_booleanfield").setValue(true);

 

Configure FLOW to trigger only on the field change as per my above screenshot and make sure you are checking new_booleanfield is TRUE 

 

because at last all the flow ran we need to update it again to FALSE because we can run multiple times after new changes too.

 

NOTE:

 

if you dont want  a button, Make the Field visible in form ask the user the change it manually thats it 🙂

 

Let me know if you need more clarity

 

Please mark as Answer if it is helpful and provide Kudos


Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com

MartinVargas
Helper IV
Helper IV

Hi  @rampprakashThanks I'm having a conflict as putting the following custom javascript doesn't make the change to the boolean column.

 

 

function OnSubmit (executionContext) {

var formContext = executionContext.getFormContext ();

       formContext.getAttribute ("crd4f_estadodelpedido"). SetValue (verdadero);
}

 

 

 

 

MartinVargas_0-1637946835547.png

 

This is the boolean column:

MartinVargas_1-1637946961888.png

 

This is the submit button:

MartinVargas_0-1637947908811.png

 

Hello @MartinVargas,

 

Could you please send me in English 🙂

 

 

 

Hello @rampprakash, I'm sorry, I still have the problem.

rampprakash
Community Champion
Community Champion

Wow cool @MartinVargas,

 

Could you please approve as answer of any of our answer helps else please provide your answer so that community can do the same further.

MartinVargas
Helper IV
Helper IV

Sorry, I still have the problem.

rampprakash
Community Champion
Community Champion

Hello @MartinVargas,

 

That's my bad, my understanding was wrong, I thought you are triggering from DataVerse.

 

If you are sending from portal, try setting the field from portal to this Boolean field from Portal.

 

Please mark as Answer if it is helpful and provide Kudos


Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (1,661)