Looking for an Example BPM to approve OrderDtl partnum change.
I can prevent it, or popup a message, but looking for a way to ask if ok to change or not.
BPMDataForm
Not sure what method this goes on, didn’t trace.
Create a pre-processing BPM on the method.
- Add a condition block, and check if the field has changed from any to another.
- On the yes side, connect a BPM Data Form block.
- Use the designer to create a new form, and add another button. Name that
No
and renameOK
toYes
. Make sure you fill out the title and your text.
Leave theYes
value to 1111. - Add a code block, and do something like this. Widget should be similar.
if(callContextBpmData.ButtonValue != 1111) //Anything other than (Yes is "1111")
{
var updatedRow = ds.OrderDtl.FirstOrDefault(x => x.Updated());
//Remove the row, we don't need it.
ds.OrderDtl.Remove(updatedRow);
//Abort, fail silently, as you already gave them a choice.
MarkCallCompleted();
//Or just let it go through the bpm, the updated row is gone anyway.
}