Hello everyone,
I am new to epicor, still trying to learn. I would need your help please. I would like to launch a BPM Data Form from a Button click event via c # customization. Using ProcessCaller.LaunchForm (oTrans, “MenuID”) points to the BPMForm, this is the same menuID for all bpmDataForms, but I don’t know how to point to my BPM Form. Thank you.
Hi Sousou,
Unfortunately I don’t think you can launch BPM data form from customisation code, at least directly.
One option is to modify the CallContextBpmData data view in the customisation, put in some special words and set your BPM to trigger by picking up that word, then launch your BPM data form from there.
An alternative way, but more hacky, is to create a UD menu, then customise it. The should give you the menu ID you need to launch from the customisation code. However, you need to handle passing data between the form you launch and the form you are calling from. You can search the forum for help on that.
Maybe someone else who is more experienced on this can give a better answer, but those are my suggestions.
Cheers,
Anh
You could fire the BPM form based on a field change and update that field with you button click. It wouldn’t need to be field on the table you could use one of the BPM Data fields.
This code would toggle CallContextBpmData.CheckBox01 and save.
EpiDataView edvCallContextBpmData = ((EpiDataView)(this.oTrans.EpiDataViews["CallContextBpmData"]));
System.Data.DataRow edvCallContextBpmDataRow = edvCallContextBpmData.CurrentDataRow;
if ((edvCallContextBpmDataRow != null))
{
edvCallContextBpmDataRow.BeginEdit();
if(edvCallContextBpmDataRow["Checkbox01"] == DBNull.Value)
{
edvCallContextBpmDataRow["Checkbox01"] = true;
}
else
{
edvCallContextBpmDataRow["Checkbox01"] = !(bool)edvCallContextBpmDataRow["Checkbox01"];
}
edvCallContextBpmDataRow.EndEdit();
oTrans.Update();
}
Or you could skip the BPM form and do the pop-up in your customization, but that’s kind of a pain since you have to code all your field placements.
Thank to both of you.
so i tried your solutions and it ended up working. So I triggered an update method of the BPM from customization according to a field.
For info, for triggering an update method from customization, i had to add a rowmod=“U” to the maindataview
maindataview .DataView(maindataview .Row)(“RowMod”)= “U”
oTrans.Update()