---
sourceDocument: Yokohama Build or modify applications
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/application-development

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Tutorial part 4: Restrict data and collaborate with other developers

# Tutorial part 4: Restrict data and collaborate with other developers {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Learn how to restrict data usage with business rules and also how to add collaborators to your application.

## Restrict data using business rules and code generation {#ariaid-title2}

Restrict data access in your application by adding business rules with ServiceNow Otto for Code generation.

### Before you begin

Role required: admin or delegated_developer

### Procedure

1. Navigate to the We Volunteer app dashboard, and select Create.
2. Select CreateFile.
3. In the Application field, enter <kbd class="ph userinput">Global</kbd>.
4. From the Server Development category, select Business rule.
5. Select Continue.
6. Enter the following data in the new business rule file:  
   * Name: Restrict Visibility
   * Table: Location \[cmn_location\]
   * Advanced: true (select the checkbox)
   * Query: true (select the checkbox)
   {#lab-4a-restrict-data-business-rules-code-gen__ul_rnh_crp_c2c}
7. On the Advanced tab, click into the third line in the script editor.
8. Open the Now Assist code generator by pressing Command + Enter (on Mac) or Ctrl + Enter (on Windows).
9. Enter this text in the prompt: <kbd class="ph userinput">check if logged in user is having x_snc_wevolunteer.user role, if yes then allow this user to show only those records from current table where type field value is event</kbd>.
10. Select the submit icon (![submit icon]()) and wait a few moments for Now Assist to generate a code snippet.
11. Select Accept.
12. Select Submit.

## Collaborate with other developers {#ariaid-title3}

Learn how to add collaborators to your app in ServiceNow Studio.

### Before you begin

Role required: admin or delegated_developer

### Procedure

1. Navigate to the We Volunteer app dashboard, and select the more options icon (![more options icon]()).
2. Select Collaborators.
3. Select Invite people by name or group.
4. Enter <kbd class="ph userinput">Eva Wickson</kbd>.
5. Select Send.
6. Log out of your instance, and log back in to the ServiceNow AI Platform impersonating Eva Wickson.
7. **Optional:** If you haven't made ServiceNow Studio a favorite in this instance, navigate to AllApp EngineServiceNow Studio, and select the star next to the module to favorite it.
8. Select ServiceNow Studio to open it.
9. On the Deployment tab, select Applications.
10. Sort the Updated column in descending order, and open the We Volunteer app.

*[\>]: and then


