I’ve had a kinetic-function calling and getting a string.
I then used a row-update to grab {actionResult.returnObj} and put that in a dataview. (Both hung on and off the success branch)
It would not do it.
Debug showed it was in the actionResult dataview.
However, if I moved the row-update to an event-next or a button, it would work fine.
#2
For what I was wanting to do, I changed tactics, and went with a merging dataset, and then decided to use row-find with the row index to another dv to find my row, and then a row-current-set with the dv.field etc. It would not do it…
Again, doing the row-current-set in an event-next or a button worked fine…
For some more context, I believe this is entirely down to the Kinetic Functions reporting success, when they have not completed their actions.
I moved my event-next to after my functions returned on my dataset based ones, and did the row-find, row-current-set, and console-write all in line, and it all worked flawlessly.
But if there is no break between the function “success” and the next chain, it dies a quick death.
Yes. Success branch is queued on response received but actionResult hydration is late and row-update eval is early. This should be well documented but is not, AFAIK.
I believe row-update is intentionally eager. Values are immediately evaluated then the action is queued. Meanwhile actionResult is still hydrating.
I believe a reliable pattern is function > success set-variable = actionResult > success > row-update. Or bind function response to a dataview to avoid row-update. Or delay.
I created a BPM that calls a BPM form giving the user the option to cancel or proceed on Post in costing WB. The kinetic form would send the toast popup that it was posted even when it was canceled…
Similar issue where it reads as a success even when it was not.
Yeah I think you’re right a delay helps because of a likely async commit gap between processRestReponse > trans.set(…) and what trans.get(…) sees when Row-Update runs.
OR maybe current row isn’t yet set on actionResult.
What do you get with this immediate console-log in success branch?
trans.dataView("actionResult").viewRow
-1 = cursor hasn’t advanced
0 = curDataRow is first row
I set the row myself, row-current-set, does not work, so I set it with javascript, and it still won’t pull it unless it’s in another event. (with console-write etc)
I’m familiar. It’s kinda how life goes in the age of “web dev is easy now so don’t engage experienced programmers”.
Epicor’s developers are using the same tools, they’re experiencing the same issues, which are escaping into production, which means it’ll be an increasing thorn in developer’s sides, and hopefully they’ll have more ability than users to lobby for fixing things.