I created am efxGetOrgUnitPrice event in Application Studio shown on the right.
The function call is pulling back json that looks like the second image on the right.
I added the column CSMCost to the TransView data view.
In my row update, I set the Ep Binding to TransView.CSMCost and the value to
“{actionResult.Result.Results[0].Calculated_CustomerCost}”, but when debugging and looking at the TransView I only see [object Object].
I started the preview, selected the Debug Tool from the Overflow menu and triggered the event. The log indicated that the call to the library was successful, but when I looked at the MyCostAndPrice in the debug window I saw nothing. I assume that I failed to set up my Data View correctly. Does this make sense to you?
After your function runs, go into Dev Tools, enable debugging and dump the views. Go to System Dataviews and drop down actionResult.
Do you see your Result column in there?
It should look similar to this, but where mine says OutDS yours would say Result.
Part of me wants to chalk this up to the version you’re on because everything looks to be setup correctly.
Alternate route question:
Are you expecting this to only ever return one row like it shows in your example there?
If so, I would edit the function to include 3 Out parameters: CSMCost, CustomerCost, and PartNum and set the values from within the function. That way you can utilize the {actionResult.CSMCost} syntax.
This function was created by another developer to accepts a list of part numbers and then return each parts information. I don’t want to change that function, but I guess I could write me own.
The developer who wrote the Erp Function said that it’s basically just a wrapper function that calls a BAQ and he’s wondering if we would have the same problem (Trying to assign object in epBinding) if I called the BAQ directly.