Wednesday, June 26, 2019

Prevent Users from Editing Approved Purchase Orders

This functionality is currently documented on Enhancement Request #92396: Create a "Require Re-approval on Edit" feature for Purchase Orders.

There is an option to create a Workflow as an alternate solution which will prevent users with specific roles edit already approved Purchase Orders.

Please use your administrator role or ask your administrator to create following workflow:

  1. Navigate to the  Customization > Scripting > Workflow > Workflows > New.
  2. In the Basic Information section:
    - Provide a Name
    - Record Type = Transaction
    - Sub Types = Purchase Order
    - Release Status = Testing; When a workflow is in testing mode, only the workflow "owner" can initiate the workflow on a record. After you test it you can set the status to Release and release the workflow into your production account.
    - Enable "Execute as Admin" check box.
  3. In the Initiation section, enable Event Based radio button.
  4. In the Event Definition section, mark the On Update check box and set Trigger Type to Before Record Load. Set Event Type to Edit.
  5. Condition:
    - Field: User Role
    - Compare Type: any of
    - Selection: find the role you want to apply the workflow on
    > Add
    > new line
    - Field: Status
    - Compare Type: any of
    - Selection: select the status of Purchase order you want to apply the workflow on:
    - Purchase Order: Closed
    - Purchase Order: Fully Billed
    - Purchase Order: Pending Billing/Partially Received
    - Purchase Order: Pending Receipt
    - Purchase Order: Rejected by Supervisor
    > Save
  6. Save the Workflow and click view on the Workflow record you have just created
  7. Click the State 1 in Diagram table
  8. Under Actions sublist please click New Action 
  9. Select Return User Error
  10. Trigger on: Entry
  11. Event Type: Edit
  12. Under Parameters at the bottom part of the page enter Text of the error message "You don't have permission to edit already approved Purchase Order".
  13. Click Save.

No comments:

Post a Comment