Monday, March 18, 2019

Create a Workflow that will Return an Error when the Employee Record is not the Time Approver

Customer would like to restrict the Administrator to view employee records if he is the Time Approver set in Employee > Time Tracking > Time Approver but still view his own employee record.

 

1.    Customization > Scripting > Workflows > New

2.    Select Employee in Record Type

3.    Check Execute as Admin

4.    Select Released in Release Status

5.    Select Before Record Load in Trigger Type

6.    Select View in Event Type

7.    Add the Condition:

(Time Approver : Name/ID != User : Name/ID) And Name/ID != User : Name/ID

8.    Save

9.    Diagram > New State

10.  Add a Name for the State

11.  Save

12.  Select the state

13.  Save

14.  Diagram > New State

 

15.  Add a Name for the state

 

16.  Save

 

17.  Select the state in the Diagram

 

18.  Actions > New Action > Return User Error

 

19.  Add an error under Parameters > Text

 

20.  Save

No comments:

Post a Comment