BPM to generate a message when a field is left blank after save


I’m trying to get a data directive in place that will have a message pop up after an order is saved, when a specific field is left blank.

Anyone have examples of this?

You will want a Method Directive. Try to avoid Exceptions and Messages in Data Directives.

Find your Method Directive typically on Update Method and there will be a Message or Exception Widget you can use.

Just a thought to ponder. Is it better to pop an error for someone to have to then click through and go back and update some field or could you pop a BPM Form up with the missing field and let them pick it / enter it there in the prompt… and then allow the save to continue?

While popping a form would be an option, it starts getting a lot more difficult due to all the possible things that could happen… First of all, you have to create the form… but secondly, you then have to create additional logic to accept the data from the form and push it into the dataset. ALSO there could be validations that should have taken place by the UI. Example, if your BPM validates for a price to be over a certain amount… the user could change the process in a dataform, BUT, you then need to do extra calls to update the extended price, update the order, etc.
I think it would be best to send the user back to the original data form UI and have them fill in the data correctly.

1 Like

How would I put this through a method directive? I have only done data directives.

It is a pop-up to just advise that the entry needs to be reviewed. Specifically the OrderHed.PayAccount is left empty. Some instances this will be left empty but sometimes not. I just want a pop-up to indicate when the field is empty.

I hope that makes sense.

first you have to find the correct method… for example, if the you are working with Part, PartPlant, etc (as associated in Part Edit program), you would use the Part.Update method (most things will be based on the “.update” method.
You would do it as a PRE processing method. Once there, you will see that there is a widget to throw an EXCEPTION. This will automatically send the user back to the user interface if the exception is shown.

@lbradbury To figure out the correct method to use, you would turn your user tracing on and then run through the UI as you expect the user to do. Once you have saved in the UI, go back to user tracing and view the trace log. This will list out the methods that were called during that interaction. If you’re entering an order, you’d see something like SalesOrder.Update or SalesOrder.MasterUpdate depending on what was entered/updated.


1 Like

Remember, MasterUpdate runs multiple times (twice?) … so when lContinue == true you’re on your second trip through the BO.

I say that because sometimes what you’re looking for doesn’t happen until the second trip.


Thank you everyone, I have learned so much from your repsonses! I believeI have created the method correctly, but when the field does have data in it I still recieve the message. So I must not have done it corectly.

Can you show us the condition in a snip?

@lbradbury I would think that would work, but try using string.Empty to see if that works. Or change the changed to Updated.


1 Like

That’s a good point. Changed means added or updated rows, I believe.

I didn’t know that! It explains so much about previous struggles, though. So would you set that in a condition when you want it to execute during the second trip through?

Yes, using it in a condition would affect when you did your actions.