Hi, I have a scheduled workflow(in Sandbox) that sets purchase approval limits for employees at the manager level. However, the workflow fails to set the value for some employees. Upon checking the logs for these employees, it shows that the SET FIELD VALUE action is being skipped with the reason: "Value cannot be set in BEFORE LOAD on an existing (not new) record." How can I resolve this issue?.
b
Ben Barnett
06/18/2024, 2:40 PM
You're trying to set a field value before the record exists. You'd have to use a trigger that happens AFTER the record exists.
a
avinash amararapu
06/19/2024, 10:35 AM
@Ben Barnett what i have to do now? Do i need to change any event types? But for other employees Purchase approval limits have been assigned by workflow. Only one employee left with no approval limit.
b
Ben Barnett
06/20/2024, 7:31 PM
Try setting that trigger to
AfterRecordSubmit
m
MGBC
06/21/2024, 10:30 PM
@avinash amararapu do you have any other workflows or scripts deployed to this record? Or any other fields that have sourcing dependent on this field?
MGBC
06/21/2024, 10:31 PM
For a scheduled workflow you have the action setup correctly. It should be the entry trigger. But it may be triggering other scripts, workflows or sourcing that is causing an error