v2018 (so scripting in JC is possible).
I'm writing a script to override the GL account for Job Posting Entry lines. (Detail PreWrite event).
I can get the override to work, with a SetValue but the grid does not refresh with the new value.
retSet = oBusObj.SetValue("AccountKey$", sNewAccount,"kACCOUNT")
When I try to use InvokeChange, nothing happens.
retSet = oUIObj.InvokeChange("AccountKey", sNewAccount, "GD_Lines")
LastErrorMessage indicates "The - is invalid" which doesn't make sense... I can type in the exact same value, so InvokeChange should work (with my assumption that InvokeChange is just supposed to mimic user data entry).
When I InvokeChange on the CommentField, an odd second line is created, which is not what I want at all. This tells me that oUIObj is created properly, but perhaps something is not right with the row handling?
Any tips? Is there a way to refresh GD_Lines on this screen so changes made by SetValue are displayed properly? I know I can drag the field into the secondary grid and everything will be fine, but I'm thinking the customer may not like that too much.