How to reallocate rights to read and modify records if an owner is changed
Example
Create the following business process: when you change the account owner, the new owner is given the right to read and change this account.
Business process diagram elements (Fig. 193):
1.Starting signal of changing the [Assignee] field of the account – receiving the signal starts the business process.
2.Reading the account id – obtaining the necessary process parameters to perform the next steps.
3.Reallocate rights to contact
Place on the diagram the [Signal] element of the [Initial events] group — "Account changed". The element will be activated when an owner is changed on the account page. Set up the signal parameters:
1.In the [Object] field, set "Account".
2.In the [What event should trigger the signal?] field, select "Record modified".
3.In the [Awaiting changes] field, select [Any field from the selected] and add the "Owner" column.
Add [Read data] element of the [System actions] group.
The "Read account" element will read data from the added account. Set up the element parameters:
1.In the [Which data read mode to use?] field, select “Read the first record in the selection“.
2.In the [Which object to read data from?] field, select ”Account”.
3.In the [How to filter records?] area, set the filter “Id = Account changed.Unique record ID". To do this, click <Add condition>, select the “Id” column, in the displayed menu select the [Compare with parameter], and then in the appeared window select [Unique record ID] of the “Account changed” element.
Add the [Change access rights] element of the [System actions] group.
The "Change access rights" element will allocate access rights to read and change account data to a new owner. Set up the element parameters:
1.In the [For records of which object should the access rights be changed?] field, set "Account".
2.In the [Change access rights for all records that fall under condition] area, set the filter “Id = Account changed.Unique record ID". To do this, click <Add condition>, select the “Id” column, in the displayed menu select the [Compare with parameter], and then in the appeared window select [Unique record ID] of the “Account changed” element.
3.If you need to give the right to read and change an account only to the existing owner, in the [What rights to withdraw?] press [+] and select [All roles and users], then select “Read” and “Record”.
4.In the [Which access rights should be added?] press [+] and select [Employee]. Open the [Employee] edit field window and select the “Id” column of the "Read owner" element save the field value. Then, select "Read" and "Record".
After creating the process elements, connect each element with the next one by dragging the element in the upper right corner of the selected process element.
Save the created business process.