Execute a function as a specific user or by the system
Hi,
is it possible to execute a function in Zoho CRM as a specific user or by the "system". The use case is the following: I want to restrict certain manual inputs by the user but still allow the user to perform certain tasks by clicking on a custom button that triggers a function.
Example 1 - Invoices
In the invoice module I have a status field. As soon as the status field is changed to "Sent" I want the record to be locked. Afterwards the only possible option for the user should be the option to click on a custom button called "Cancel Invoice" which will change the status field to "Cancelled" but the record is still locked.
What we tried: We set up a lock configuration that is triggered when the status is either set to "Sent" or "Cancelled". We created a profile that can bypass this configuration called "System". The problem is now that only the system account can click the Cancel Invoice button as otherwise the function behind the custom button will be executed with the role of the user clicking the button.
Example 2 - Creation of new records
I want to disallow all users to create Purchase Orders. They should still be able to create purchase orders via a custom button in a Sales Order record to turn a Sales Order into a Purchase Order. Therefore we have a custom function that is triggered by the button but if the user has no rights to create a purchase order this function will fail.
As you can see it would be very practical to have an execution context for a function to execute certain custom buston clicks with "system/admin" priveleges.
Is there any way of doing this or are you planning to implement this?
Cheers,
Tom