I am trying to set Voucher Status automatically using a Workflow and getting above error for the below method.
- VoucherEntry_ReadyToUpdate():Void
Here I am triggering an Event when a Voucher get status “Approved”.
And the workflow is trying to set the status as “Approved” of the Vouchers with the same no and awaiting approval in other companies.

Before calling method VoucherEntry_ReadyToUpdate , workflow reads the Voucher

Same Error appears for hardcoded vales.

Any advice how to avoid that Error is highly appreciated. Thanks in advance for your help!