Assign profile to app user
Overview
This deluge task assigns a specified profile to specified users.
Return
This task returns a MAP value in the format {"profileName":"<specified_profile>","emailId":"<specified_email>"}
Syntax
<variable> = thisapp.permissions.assignUserInProfile(<email_ID>, <profile_name>, <notification>);
Param | Data type | Description |
---|---|---|
<variable> (optional) | KEY-VALUE | Variable which will hold the returned value. |
<email_ID> | TEXT | Email id of the user to whom the profile must be assigned. Points to note for this parameter:
|
<profile_name> | TEXT | Name of the profile which needs to be assigned to the specified user. Points to note for this parameter:
|
<notification> (optional) | BOOLEAN | Decides if an email invitation to join the organization needs to be sent when the specified email address doesn't correspond to any of the existing users. If this param is true, an invitation to join the organization will be sent to the specified email address. Otherwise, the mail will not be sent. Default value: false Note: In Zoho Creator Custom Solutions, an invitation will always be sent to the specified email address irrespective of the value of this parameter. |
This task can be used in the following events
When a record is Created | ||
On Load | Yes | |
On Validate | Yes | |
On Success | Yes | |
On User input | Yes | |
Subform on add row | Yes | |
Subform on delete row | Yes | |
When a record is Created or Edited | ||
On Load | Yes | |
On Validate | Yes | |
On Success | Yes | |
On User input | Yes | |
Subform on add row | Yes | |
Subform on delete row | Yes | |
When a record is Edited | ||
On Load | Yes | |
On Validate | Yes | |
On Success | Yes | |
On User input | Yes | |
Subform on add row | Yes | |
Subform on delete row | Yes | |
When a record is Deleted | ||
On Validate | Yes | |
On Success | Yes | |
Other workflow events | ||
On a scheduled date | No | |
During approval process | Yes | |
During payment process | Yes | |
In a Custom Function | Yes | |
In an Action item in report | Yes |
Example
1. A sample snippet assigning "Read" profile to a user.
2. A sample snippet assigning "Write" profile to a user and sending an email notifying the same to them.