Rest-erp -- how to properly pass ds

Hi there,

I am attempting to create a switch between report styles based on a parameter - I am struggling to properly pass ds through the rest-erp BAQReport.TransformAndSubmit call.

Copying the exact rest-erp component from the locked system event does not pass anything in ds and breaks the rest call - they don’t even define ds in the method parameters or request parameters etc.
image

I am unsure of how to properly get ds across, especially since dataviews don’t necessarily match.

Current dataviews I am working with:
image

Correct payload that I am looking for:
image

Current payload and ds parameter:
image
image
I have also tried the regular rest component but am unfamiliar with this. I have also tried leaving ds blank the same way that the Epicor system event does with no luck. Any help is greatly appreciated!!

Solution found:
I am creating a new ds and manually updating the values with row-update
image

value:

rest call:
image
image

This has worked and has successfully generated my report as expected.

3 Likes

Better Solution Found:

Build ds using a function with Epicor Functions Maintenance.

Response Parameter type = System.Data.DataSet
Input parameters = anything you need to set dynamically. For example:
image

Response parameter for your custom ds can be inserted directly into the rest call with actionResult.yourParam
image
image
*haven’t yet changed the param name from json to something more fitting - I was first attempting this with serialized json

Payload is perfect!
image

1 Like