Can anyone please guide me if we can give permissions on a form say "Sales Order", I want different fields to be visible to different users so that different users do not have to hide/ unhide the fields again and again.
There's not an easy way to do this, because the actual client is not role-based. You can disable fields directly via code by checking if the user has privileges to view the field (maybe via settings in User Setup).
1)If Client is role-based then write the following code to disable certain fields and buttons
MemberOf.setrange("USER ID",userid);
if MemberOf.find('-') then
MemberOf.setrange("ROLE ID",roleid(cleint role id));
if MemberOf."ROLE ID"=roleid(Client role id) then
currform.field.enabled:=false
{currform.contrl.enable:=false}
else
currform.field.enable:=true
2)If Client is not role-base probably you have to set in user setup
Comments
MemberOf.setrange("USER ID",userid);
if MemberOf.find('-') then
MemberOf.setrange("ROLE ID",roleid(cleint role id));
if MemberOf."ROLE ID"=roleid(Client role id) then
currform.field.enabled:=false
{currform.contrl.enable:=false}
else
currform.field.enable:=true
2)If Client is not role-base probably you have to set in user setup