Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By fibo2358
#813629
Hello,

Could you please tell me whether there is a possibility to dynamically add Process Permissions to the case?
I would like to add a possibility to give read access to the case objects (i.e. to a Summary Form) for the user selected in a field in a Dynaform during the process. The selected user will not participate in the process.
The selected user may be different for each case so I cannot use any static username or group in the Process Permissions.

Please help.

Best Regards,
fibo2358
#813631
Dynamically changing the process permissions is not a good idea in my opinion, because you are changing the permissions for every case in the process, so the user will be able to see all the cases.

I recommend:
1. Create a group with all the users who might need to see the form in a case. Note: If you don't know all the users that will need to added to the group, then use PMFAssignUserToGroup() in a trigger.

2. Then, create a process permission giving access to the form only if the user participated in the case.

3. Then, add that group to the Ad Hoc Assignment list to the tasks in the process.

4. Then, when a user is selected in a dropdown box to see the form, execute a trigger that will temporarily reassign the case from the current user to the selected user and then back to the current user. That way the selected user can find the case under Home > Participated and see the form.

See this code example:
viewtopic.php?f=41&t=730000&p=812380&hi ... ed#p812380

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]

What's SAP FICO?

Trustworthy and skill-building, each of these actu[…]