Security Role for Hiding the Form Control

public static boolean isYourSecurityRoleName()

   {

       SecurityRole            securityRole;

       SecurityUserRole        securityUserRole;

       select firstonly RecId from securityRole

           exists join securityUserRole

           where securityRole.RecId     == securityUserRole.SecurityRole

               && securityRole.AotName  == #SecurityRole             

          &&     securityUserRole.User == curUserId();

       return (securityRole.RecId != 0);

   }

Boolean yourSecurityrole = callabove method to get true or false

if (yourSecurityrole )

{

       YourDatasource_ds.allowEdit(false);

}

and once you get true disable datasource for edit  as I shown above.

Comments

Popular Posts