Hello, Im having trouble with an User Event, this ...
# suitescript
i
Hello, Im having trouble with an User Event, this user event uses an
afterSubmit()
to do some logic, in this part it retrieves some values using
getText()
from the PO using the `context.newRecord`I was doing some tests with some POs that were already created and everything worked ok, but now, when the PO is created from an automated process, meaning the user only clicks a button on the SO and the PO gets created I get the next error `Invalid API usage. You must use getValue to return the value set with setValue().`Does this means that the other process using
setValue()
to set a field prevents me from using
getText()
even though Im using an
afterSubmit()?
s
Yes that is exactly what it means.
i
Is there a way around it?
s
Get whatever the text would be from the source record/list itself?
i
yeah you’re right! thanks! @Sandii
s
In theory forcing sourcing on the field setting should make the text be there, but I am not sure that works