Question

Access distribution - on demand

Hello,

 

As a standard access distribution is invoked upon creating new record.

 

In my case i would like to invoke this method after some modification on object. Second question is whether record author (in Object permission setting) is always creator of record ? In my case i would like to reinvoke this method.

 

Regards,

Like 0

Like

1 comments
Best reply

Hello Marcin,

 

You can create a process on the object that will be triggered upon editing the record. You can use a script task inside this process that will call for the "ApplyChanges" method in the "RightsHelper" schema from the "NUI" package.

 

This method has the "editedItems" variable in it that you need to work with and that is then used in the "dbExecutor" in the "UpdateRecordRights" method. And "UpdateRecordRights" is the answer to your second question regarding the record author: record author is always a creator of the record and this author is read in the "item.SysAdminUnit.value" argument of the "SetRecordRight" method that is called inside the "UpdateRecordRights" method.

 

Please study the "RightsHelper" service logic to achieve the task you need.

 

Best regards,

Oscar

Hello Marcin,

 

You can create a process on the object that will be triggered upon editing the record. You can use a script task inside this process that will call for the "ApplyChanges" method in the "RightsHelper" schema from the "NUI" package.

 

This method has the "editedItems" variable in it that you need to work with and that is then used in the "dbExecutor" in the "UpdateRecordRights" method. And "UpdateRecordRights" is the answer to your second question regarding the record author: record author is always a creator of the record and this author is read in the "item.SysAdminUnit.value" argument of the "SetRecordRight" method that is called inside the "UpdateRecordRights" method.

 

Please study the "RightsHelper" service logic to achieve the task you need.

 

Best regards,

Oscar

Show all comments