Although the edit permission for a field is granted to the record creator, s/he cannot enter data into the field
From the time the New record screen is opened until it is saved, the value of the Created by field is not finalized.
For this reason, permissions granted to the Created by user for a record are not applied while the record is being created.
For example, suppose that you have a "Daily Report" app with a "Work summary" field that is only allowed to be edited by the user in the Created by field of a record.
In this example, the permission settings for the "Work summary" field are as follows.
- Created by: Has the View and Edit permission checkboxes selected
- Everyone: Has the View permission checkbox selected
When the permission settings above are configured, the permission set for Everyone will be applied to records while they are being created and do not yet have a finalized Created by user.
This means that the "Work summary" field cannot be edited by any user while a record is being created.
Workaround using a "Group selection" field
To get around the issue mentioned above, you can use a workaround as shown in the following example.
- Settings for when a record is being created:
Allow anyone to edit the "Work summary" field when a record is being created and the Created by user has not yet been finalized. - Settings for when a record is being edited:
Allow only the user in the Created by field to edit a record after it has been saved.
Workaround explanation
If a user is included in multiple permission sets in the Permissions for fields settings, the permission set located highest on the list will take precedence.
You can use the order of priority to make it so that a permission set with a higher priority than the one for Everyone is applied to all users other than the Created by user when a record is being edited.
To do this, we use a Group selection field.
Add a Group selection field to your app form and set Everyone as the default value. Then, configure the following permission sets in the order shown below.
- Created by: Has the View and Edit permission checkboxes selected
- Group selection field: Has only the View permission checkbox selected
- Everyone: Has the View and Edit permission checkboxes selected
How the permissions will be applied
The permission settings described above will be applied in the following way.
- Settings for when a record is being created:
The Everyone permission set at the bottom of the list will be applied to all users. - Settings for when a record is being edited:
The Created by permission set at the top of the list will be applied to the user in the Created by field.
The Group selection field permission set listed second will be applied to all other users.
Steps to configure the settings
-
Place a Group selection field on your app form.
-
In the settings of the Group selection field that you placed in step 1, enter the Name and Default value as shown below.
- Name: Group Selection A
- Default value: Everyone
-
Click Save form.
-
Click App settings tab, and then select Fields under Permissions.
-
On the Permissions for fields screen, set the following permissions.
- For the "Work summary" field:
- Created by: Has the View and Edit permission checkboxes selected
- Group Selection A: Has only the View permission checkbox selected
- Everyone: Has the View and Edit permission checkboxes selected
- For the "Group Selection A" field:
- Everyone: Has the View and Edit permission checkboxes deselected
- For the "Work summary" field:
-
Click Save.
-
On the App settings screen, click Update app.
-
On the Update app dialog, click Update app.