Retrieve User Information with javascript

i’ve created some additional javascript in order to disable some custom fileds in Leads module.

No problem for js inclusion and jquery code.

The only help i need is to retrieve some employee information.

Let me explain.

In employee module i have a dropdown wich can have this possible values:


I need to retrieve this value from a conneted user so:

if user is:
I -> permit to use all fileds
E-> disable some fields

Thank you for pointing me in a right way


You should be able to do what you wish through the use of SecuritySuite.
The free version of this comes with SuiteCRM, but to get field-level functionality, you’d have to get the Full version of SecuritySuite:

You can set up User Roles & Groups in both the Full and the Free versions.
You could possibly create a group called “External” and assign users to it.

However, The full version of SecuritySuite will allow you to specify which fields a user or group can see on a record.
(.i.e: You can hide custom fields from Users in the group External)

Although, if you don’t wish to purchase the full version of SecuritySuite, the following guide will show you how to make fields Read only, depending on a User’s role:

Thak you,
however i would like to make all more simpler.

So any idea about how code it?

Thank you

You could create a role for your external users and follow the guide:

This guide will show you how to make fields Read only based on a user role.

Another hint…

Does teh link you provided me works also with related module?

Thank you

Just tried…and it works…

Thank you

mmm…i’ve smiled too earliy…

The link you provide works well in a dropdown field but i need to modify this code:

‘customCode’ => ‘{if $ReadOnly == “readonly”}{$fields.dbgit_contactaccountdir_c.value}{else}{html_options name=“dbgit_contactaccountdir_c” id=“dbgit_contactaccountdir_c” options=$fields.dbgit_contactaccountdir_c.options selected=$fields.dbgit_contactaccountdir_c.value}{/if}’,

for my relate field.

Could you help me?

Thank you