I am working on a customization for the Customer Shipment Entry application.
The task is straightforward: I need to call the SalesOrder service and populate the ActionResult dataview with the response from this REST call. This will enable me to perform checks down the line and trigger errors, notifications, etc.
However, I am facing an issue since the ActionResult dataview is already populated with data from prior Epicor REST calls before I make my own REST call. As a result, my REST call overrides the existing data in the ActionResult dataview.
Overall, this wouldn’t be a problem if we assume that the ActionResult data is never used outside the context of this single event and that the Epicor data I am overriding is no longer relevant. In that case, I can dispose of it without issue.
But if the data I am overriding in the ActionResult is still relevant, it can cause hard to debug problems.
What has been your experience with ActionResult?
Do you typically override the data in it during a REST or function call, or do you make use of a merge behaviour?
For instance, in order to avoid overriding data stored in ActionResult, do you add new rows to the ActionResult, set the current row to the last one, use your temporary data, and then subsequently remove the new row?