Passing CallContextBpmData To BPM Data Form

Good morning mega-minds! My company is using Epicor 10.1.500.16.

I’m trying to pass a value assigned to CallContextBpmData.Number20 from a Method Directive to a BPM Data Form. I assign the value (quote number) in custom code in my Method Directive…

Then I call to a BPM Data Form, where I try to retrieve the value in the custom code of the Load method…

I even added a MessageBox to test if the value was being passed, which it wasn’t. I know the value is getting set in the Method Directive because I use a show message module to display the value before calling to the BPM Data Form. I have used the EpiDataView code in custom code for our dashboards and it has worked, but I can’t get it to work in this BPM Data Form.

EpiDataView edvt = ((EpiDataView)(this.oTrans.EpiDataViews[“CallContextBpmData”]));

Any ideas why this wouldn’t work? Thank you for your time and any help you can provide! Have a great day!

Good morning,
I am not sure this is what you need, but this is how I manage CallContext from C#.

EpiDataView edvCallContextBpmData = ((EpiDataView)(this.oTrans.EpiDataViews["CallContextBpmData"]));
System.Data.DataRow edvCallContextBpmDataRow = edvCallContextBpmData.CurrentDataRow;
edvCallContextBpmDataRow["Character01"] = txtPartNum.Text;
1 Like

@NateS Thank you for the reply! I tried the code format in your example, but I still couldn’t return the saved value in “Number20”…

//
// Fill Grid with Data from BAQ on Load
//
private void IP_PMDash_PartsSel_Load(object sender, EventArgs args)
{
// Get Quote Number from ContextBpmData
EpiDataView edvCallContextBpmData = ((EpiDataView)(this.oTrans.EpiDataViews[“CallContextBpmData”]));
System.Data.DataRow edvCallContextBpmDataRow = edvCallContextBpmData.CurrentDataRow;

  MessageBox.Show("Quote Number: " + edvCallContextBpmDataRow["Number20"]);

This must have something to do with custom code in forms versus custom code in BPM Data Forms, though I couldn’t find anything in my search to say that.

What if you use the Set BPM Data Field widget to define the call context number value?

1 Like

I can set the callContextBpmData field in either the custom code or the ‘Set BPM Data Field’ widget, and I can get that to display in the Show Message widget. But when I try to recall that value from the BPM Data Form’s custom code, I get nothing. Doing it the way you’ve demonstrated, if you were to call a BPM Data Form with a customization, would you be able to retrieve the “SN” value assigned to Character01?

Example:

EpiDataView edvCallContextBpmData = ((EpiDataView)(this.oTrans.EpiDataViews[“CallContextBpmData”]));

System.Data.DataRow edvCallContextBpmDataRow = edvCallContextBpmData.CurrentDataRow;

MessageBox.Show("Character01 = " + edvCallContextBpmDataRow[“Character01”]);

I have figured out that for BPM Data Forms you have to use ‘BPMData’ instead of ‘CallContextBpmData’. So the code below will work now…

EpiDataView edvCallContextBpmData = ((EpiDataView)(this.oTrans.EpiDataViews[“BPMData”]));

System.Data.DataRow edvCallContextBpmDataRow = edvCallContextBpmData.CurrentDataRow;

MessageBox.Show("Character01 = " + edvCallContextBpmDataRow[“Character01”]);

1 Like

Nice Job!

2 Likes