Assign profile to app user

Assign profile to app user

Note:

  • This task is applicable only to Zoho Creator.

Overview

This deluge task assigns a specified profile to specified users. 

Return

This task returns a MAP value in the format {"profileName":"<specified_profile>","screenName":"<specified_email>"}

Syntax

<variable> = thisapp.permissions.assignUserInProfile(<email_ID>, <profile_name>);

ParamExplanation

<variable>

(optional)

Variable which will hold the returned value.

<email_ID>

Email id of the user to whom the profile must be assigned.

Points to note for this parameter:

  • You can specify multiple email addresses in a list format.
  • If the specified user does not exist in the app, the new user will be added with the specified profile.  
  • You can view the email addresses of existing users in you account from the Account Setup page, and existing users in the application from the Users page.

Applicable data types are List and String.

<profile_name>

Name of the profile which needs to be assigned to the specified user.

Points to note for this parameter:

  • If the specified profile does not exist, execution of the script will stopped during runtime and an error message will be displayed. 
  • You can view the existing profiles in your app in the Permissions page.

Data type is String.

This task can be used in the following events

When a record is Created
On LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Created or Edited
On LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Edited
On LoadYes
On ValidateYes
On SuccessYes
On User inputYes
Subform on add rowYes
Subform on delete rowYes
When a record is Deleted
On ValidateYes
On SuccessYes
Other workflow events
On a scheduled dateNo
During approval processYes
During payment processYes
In a Custom FunctionYes
In an Action item in reportYes

Example

A sample snippet assigning "Read" profile to a user.

thisapp.permissions.assignUserInProfile("john@zillum.com", "Read");

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeluge.com