Hi everyone!
Does anyone know any way to block closed projects/opportunities? I need users can’t edit the registers in this state. In other hand, I need that in related fields cannot be chosen. Please, I need your help!!! Thanks in advance.
Hi,
you could forbid direct updates of the bean by dynamically adding security groups (using workflows).
For relationships you’ll probably need to add some hooks, e.g. before_relationship_add. Here you could verify the current status and either add or remove the relationship.
My goal is that when an opportunity is in a state “Cancelled”, users can’t edit it. But with this method, the users can view all oportunities and edit only the opportunities which they have created. There aren’t change with the workflow.
Could you help me, please???
Thank you very much!!!
As a variant you can make special form where fields mark as readonly for your projects in status “Cancelled”. For it you should edit several php files.
That workflow looks like it should assign the Security Group to the Opportunities
If you go to one of your “Cancelled” Opportunities, do you see both of your security groups in the Subpanel?
(The One that the user is assigned, and the “Cancelled” one)
Or just one?
If you see both, it might be due to the setting “Additive Rights” in Security Suite settings.
I believe this is because the “Additive Rights” setting will apply the most non-restricting permission of the user’s groups.
(Which in this case, allows them to edit/view)
If you toggle the “Additive Rights” in Security Suite Settings, does it behave closer to what you’d expect?
If you only see one Security Group, Which one?
If it is not your “Cancelled” group, It might be worth checking the Workflow’s “Process Audit” subpanel to see if it has run successfully on any records
Also, as an aside, the “Access”->“Disabled” permission will prevent the user from access the Opportunities Module itself, not specific records
You might have to Allow Access, but setting “None” for the other permissions should suffice
Moreover, I have tried to change the role associated with this security group (now the module Opportunities is enabled althought the rest of options are in none), but the result is the same: I can edit the opportunity…
I solved that very need with Conditional Notifications plugin, cheap and one time charge (see Suite CRM Store). You will also need Field Level Access plugin. I’ve Also hired the FLA plugin vendor for a little customization for quite a fair value. (the customization is to have Read Only fields appearing as regular fields in edit layout, but with no edit rights)
For a given module, I’ve created a numeric field, let’s say, “Cancelled” with default value 0.
Then a workflow. Whenever the record is saved and status is “Cancelled”, set the Cancelled field value to 1.
In Field Level Access, I marked that field “Cancelled” as “Read Only” for the needed roles and put it in the edit form, “hiden” in a “Control” tab.
Then, in the Conditional Notifications plugin, I created a new notification for that module, with the condition “Cancelled = 1”, then set for Save Not Allowed with a message like “You are not allowed to change a Cancelled record”.
With a few hundred bucks (one time charge) and 30 minutes, your issue is solved.
Another solution is to code a little PHP file and put it as a hook method, but you will need a programmer and learn how to extend SuiteCRM. With time and some frustration, will get there.