SuiteCRM 8 views customizations

Hi,

The developer documentation for SuiteCRM shows how to customize view with logic like make a field readonly depending on other field values.
That is quite clear, but what we need for our clients is often more complex as the logic also depends on which user is currently using that view.
Let me take a simple real life example:
When an opportunity is in stage Closed Won :

  • The Amount and Account fields should be readonly for users with role Sales Person
  • These fields should not be readonly for users with role Sales Admin (so that they can fix errors)

Did anyone manage to handle this kind of requirements? or did I miss something when looking at the documentation?

That’s one of the issues that really prevent us to upgrade our larger clients from SuiteCRM 7 to SuiteCRM 8 as we very often have to show/hide fields, make them required or not, readonly or not, which is quite easy to do in SuiteCRM 7.

Thanks in advance

Hi,

Currently, SuiteCRM default functionality does not allow setting specific fields to read-only based on roles. While it is possible to set entire modules to read-only, setting permissions on specific fields requires custom code.

For v8, I know that these functionalities are evolving, I believe this might become possible pretty soon :crossed_fingers:

I would not mind custom code, but have no idea where to start.

If you look here in SA Blog:

this is the new way to β€œupdate” field definitions in a β€œlive” way, you can use this to detect the current users capability and then modify the readonly property based on their role. You can add custom/dynamic logic in this way as well (so you could completely hide the field for some roles as well).

Also for Non Role based stuff the field logic can handle quite a bit of required/show/hide based on other fields and combinations of things. the backend-processing can handle even more complex situations as well.

If you combine that with custom field logic (in Angular) you can pretty much do whatever you need to.

Mark

2 Likes