CallContextBpmData Blank in UBAQ

,

Hi All,

I have a dashboard that I am calling from AR Invoice Entry through a button I added. I am setting CallContextBpmData.Character09 to the GroupID from AR Invoice Entry and I would like to use that GroupID in the Update method of the UBAQ on the dashboard. I debugged the customization with Visual Studio and found that the Character09 is being set to the correct GroupID, but when I send the value of Character09 to the log from the UBAQ Update method, it shows as blank.

Any idea why that value wouldn’t carry over or how to fix it?

Have you run a trace including Call Context Data ?

See where the last link in the chain is where the data in the field is gone and maybe
we can see from there.

If I trace from when I open the dashboard to when I close the dashboard, the value shows as set properly when the GetList method of the query runs, but then is empty when it gets to the Update method right after that.

It actually doesn’t show the CallContext at all for the Update method:

  <businessObject>Ice.Proxy.BO.DynamicQueryImpl</businessObject>
  <methodName>GetList</methodName>
  <appServerUri>net.tcp://grecorappd01/EpicorERP/</appServerUri>
  <returnType>System.Data.DataSet</returnType>
  <localTime>2/20/2023 13:07:15:6880521 PM</localTime>
  <threadID>1</threadID>
  <correlationId>7ce6435d-fc24-4ede-b5ce-a3d2091dc293</correlationId>
  <executionTime total="833" roundTrip="827" channel="0" bpm="0" bpmDataForm="0" other="6" />
  <retries>0</retries>
  <parameters>
    <parameter name="queryDS" type="Ice.BO.DynamicQueryDataSet">
      <DynamicQueryDataSet xmlns="http://www.epicor.com/Ice/300/BO/DynamicQuery/DynamicQuery" />
    </parameter>
    <parameter name="executionParams" type="Ice.BO.QueryExecutionDataSet">
      <QueryExecutionDataSet xmlns="http://www.epicor.com/Ice/300/BO/DynamicQuery/QueryExecution" />
    </parameter>
    <parameter name="pageSize" type="System.Int32"><![CDATA[0]]></parameter>
    <parameter name="absolutePage" type="System.Int32"><![CDATA[0]]></parameter>
    <parameter name="hasMorePage" type="System.Boolean"><![CDATA[False]]></parameter>
    <parameter name="CallContext" type="Ice.Bpm.Context.ContextDataSet">
      <ContextDataSet xmlns="http://www.epicor.com/Ice/300/Bpm/Context">
        <BpmData>
          <Character09>FIREBALL</Character09>
          <SysRowID>00000000-0000-0000-0000-000000000000</SysRowID>
        </BpmData>
      </ContextDataSet>
    </parameter>
  </parameters>
</tracePacket>

<tracePacket>
  <businessObject>Ice.Proxy.BO.DynamicQueryImpl</businessObject>
  <methodName>Update</methodName>
  <appServerUri>net.tcp://grecorappd01/EpicorERP/</appServerUri>
  <returnType>System.Data.DataSet</returnType>
  <localTime>2/20/2023 13:07:19:2267065 PM</localTime>
  <threadID>1</threadID>
  <correlationId>e50ceba9-d095-44d7-b36b-de949fb92afe</correlationId>
  <executionTime total="1050" roundTrip="1046" channel="0" bpm="0" bpmDataForm="0" other="4" />
  <retries>0</retries>
  <parameters>
    <parameter name="queryDS" type="Ice.BO.DynamicQueryDataSet">
      <DynamicQueryDataSet xmlns="http://www.epicor.com/Ice/300/BO/DynamicQuery/DynamicQuery" />
    </parameter>
    <parameter name="queryResultDataset" type="System.Data.DataSet">
      <QueryResultDataSet />
    </parameter>
  </parameters>
</tracePacket>

That is odd, I wouldn’t think it would be going out of scope, since it was available in the getlist,
but stranger things have happened.

Just for giggles, could you customize the dashboard and see if it’s populated on load in the dashboard
itself?

And if so, try setting it again before save?


As a potential workaround, you have two input tablesets that are going to update.

queryDS and queryResultDataset. You could always shove some data in there and
retrieve it and purge it in pre-processing on update.

It is populated in the load method of the dashboard, that is actually where I am setting it in the first place.

I set it again before save but no change.

Can you explain your workaround a bit more? I have access to the queryResultDataset in the Update in the form of a ttResults temp table, but I’m not sure how I would get the value in there.

In the form customization, you should be able to find the dataset by clicking on the grid.

Add a row before update, add some kind of unique id you can pick up in pre-processing.
Pull your data out in pre, and remove the row before it goes to base.

Clear as mud?

My coworker says “clear as purple crayon”. :slight_smile:

I debugged the customization through Visual Studio and found a this.Results_Column property which seems to be the data table attached to the grid. I added a Calculated field to my query and initialized it to null and then in the customization I create a new row with a value in the calculated field to be able to easily find it:

DataRow row = this.Results_Column.NewRow();
row["Calculated_GroupID"] = MainController.LaunchFormOptions.ValueIn.ToString();
this.Results_Column.Rows.Add(row);

The LFO value is my groupID and is passed correctly from AR Invoice Entry to the dashboard customization I have checked that plenty of times. When I get to the Pre Processing BPM there are no records where the Calculated GroupID is not null, so it seems I am not adding the row properly.

Probably need a rowmod = a or a sysrowID, rowid, sysrevid etc.

See what a normal row has.

Or some mandatory fields etc.

Revisiting this because I was doing other projects the last couple days and am still stuck. If I debug my customization in Visual Studio the values seem to be set correctly, but anything that gets changed in the customization does not show in the dashboard, so it seems the data isn’t completely updated.

Alternatively, if I manually go into the dashboard and key a groupID into the column everything works as I would hope it to. Something between the customization and the query still isn’t quite working right.

This sounds vaguely familiar but I can’t put my finger on it.

This a dashboard assembly, or runtime?

Assembly

My coworker created a working example using ABC Code, but mirroring that doesn’t work for me in AR Invoice Entry if that helps confuse you more.

After doing some testing, I’m seeing the same behavior. The call context just does not get passed.

I can successfully modify the dataview that gets sent to update, however, unless you want to start
playing with the grid itself, I have found no event that fires before update, so you can add a row
or set a field.

What I would do, is make the dashboard itself not updateable, and add a button to the form
to run a custom action. Then you can pass whatever you want, including call context.

This pointed me in the right direction I think. Call context is available in the custom action so I can avoid doing a lot of what I was doing and go back to the original approach now. Many thanks!

1 Like

Hey, we learned something.

1 Like