Use callcontextbpmdata in form calculation

Hello,

How can I get data from a callContexBpmData field and utilize it on a form customization to do a on screen calculation? I have poked around here looking for a solution, but most of what I see is focused on setting callContexBpmData from a form so that a BPM can fire with some set criteria. I guess I am trying to do the reverse, set callContexBpmData data in my BPM and use it on a form.

I have a post BPM that sets a few UD fields on the ttQuoteMtl table when a Part is pulled into a quote, ErpQuoteAsm.GetMtlPartInfo. All this is working great, I have textboxes on the form that are bound to these UD fields. I have corresponding logic that does my calculations in real time on the screen based on these values. At this point aspects of my calculations are hard coded into the form customization. But everything is working as desired. The values I need to replace the hard coded data with exist in the UOM tables. So I thought I would just grab them in my BPM and use them in the form by assigning them to callContexBpmData fields. I don’t need these values saves in UD fields, they are just needed to make calculations. The BPM I have is getting the correct data b/c I can send the callContexBpmData a message box when the BPM fires.

Any thoughts on this are much appreciated.

Thanks,

Joe Marenghi

It may be easier to just use a BAQ Data View in the form customization to get the values you need from the UOM tables. I’m not sure (if ever) when callcontextbpmdata would be passed back to the form.

Thanks Adam,

I will explore this as an option… I have yet to utilize BAQ Data VIews.
I did however find an answer in another post here about calling the values that I set in the BPM.
Now I can assign the values to a variable in my code and do the calculations.

This is the solution that worked:

I read this one earlier but didn’t quite grasp it. I pulled in the code from the solution in this post, modified it a bit and now I have what I want.

-JM

1 Like