CurrentUser Function
CurrentUser () as Object
Category: | ObjectReference |
Description: | Returns the current user object |
Supported Context: | BusinessRules |
Returned value as Object | Returns the current user object |
Example #1 |
Build a validation rule on the User Entity "Add" operation that will prevent non-admin users from inviting new users into the organization. Set the Evaluation Criteria to be: Not(CurrentUser().Admin) |
Example #2 |
Build a validation rule that will prevent the deletion of approved timesheet entries by users that are not set as the approver of the timesheet itself. Build the validation rule on the TimeSheet entity and set its Evaluation Criteria to be: ($State = "Approved")&& (CurrentUser()<> $ApprovedBy) |
Tips |
|