Table of Contents

Add Read-Only Access For Users

Danielle Kellogg Updated by Danielle Kellogg

Scenario

Your app stores records that you want your users to login and view. However you do not want your users to edit or delete these records.

For example, an app that stores Order records where Customers can login and view their Orders but not edit.

Requirements

The following are requirements for adding this recipe:

  1. Your app has an object that stores records you want your users to view. In our example, this is an Orders object.
  2. Your app has user logins activated with defined user roles.

Recipe

These steps will add a new user role, and add a new page for those users to log in and access. By adding “read-only” views like tables and details to that scene, the user will only be able to view records, not edit or delete them.

Add a User Role

If you don’t have a user role ready, you can add a new user role from the Schema section of the Builder. To add a new user role click on the green “+” button in the user role section at the bottom of the left column.

Once you have added your user role, add at least one user record to login and test this functionality with.

Connect the Object to the User Role

Connection fields are used to link records from different objects together. The next step is to add a connection so each Order record can be connected to a Customer.

In the Schema section of the Builder, select on the Orders object from the left menu, then click the green "+” button from the right Connections column to begin adding a new connection field:

This will open a modal popup walking your through the steps to add a connection. We want to connect each Order record to a Customer, so select “Customer” as the object to connect to:

Click “next” to proceed to the next step and choose the connection type. Keep the default settings so each Order connects with one Customer and each Customer can connect with many Orders.

Click “Add Connection” to submit this new connection. There will now be a Customer connection field on the Order object:

Now from the Records section of the Builder you can view this connection field and update your Order records. Connection fields work like “look-ups”, so you can click on any of the empty Customer cells to look up and select a Customer to connect to. Select the test Customer that was added above:

Add a New Page Displaying Records

Now that you have a user role which is connected to an object, you can display records for the logged in user to view but not edit. In this example Customers will be able to view a table of their Orders but not make any changes to the Order.

Essentially, you are adding a page that does not contain edit options for the Customer. This means a page with no forms, action links or inline editing.

 In the Pages section of the Builder, click the green "+" to add a new page and select the "Login Page" option.

From there choose the option to "Limit permissions to specific user roles" and in this example we are limiting the logins to the Customer user role that we added.

Then you can select the view type and which Object's records will be displayed. In this example we have selected a table view displaying Order records.

Then you will be prompted to add additional links to your view. To prevent edits to the records in the view, be sure to not select the "edit each record with a form" option.

Now you have a page where Customers can login and view their Order records but not edit those records.

Login & Test

Now that you have set up a page giving users read only access, open that page in the Live App by clicking the "Go to Live App" button in the top right to test your app (you may need to select it from the drop-down menu if you have more than one page).

Login with the email and password you created with your test Customer user.

The logged-in Customer will see a table listing any Orders that you connected to that Customer. Each Order can be clicked to view more details, but there are no options to edit.

Notes

I don't require logins but want my records to be read only

Thats possible too! In order to make your Live App read only, the biggest thing to be aware of is making sure there are not edit forms, inline editing on tables, or action links on your views. If those features are not present your users will not be able to make any changes.

How did we do?

Create a Single Login Page for Multiple User Roles

Show Records Connected To The Logged-in User's Company Or Other Group

Contact