Read only views and Custom methods(Buttons)

Requirement :

  To make the view read-only for a group of users, meaning they should only be able to view the data and should never be let to modify in any case.


Hurdle:

  UI can be made read - only by assigning those set of users with a different set of responsibility. And make all the views in the Responsibility to Read only.




Solution: 

 For this i could not think of any non-scripting solution. But the least impacting solution would be to use,

TheApplication().InvokeMethod(“IsViewReadOnly”, TheApplication().ActiveViewName())

What this does it to check if the view is read - only in the current session and if so will return "TRUE".

 Usage:

from BS, 

function ShowViewROStatus()
{
   var sActive = TheApplication().ActiveViewName();
   if (TheApplication().InvokeMethod("IsViewReadOnly",sActive) == "TRUE")

          TheApplication().RaiseErrorText(sActive + "is read only.");
   else
         TheApplication().RaiseErrorText(sActive + "is not read only.");
}


 

Hope it helps!!

Comments

Popular posts from this blog

Refresh Siebel Applet not Buscomp - "RefreshBusComp" Alternative

BCHasRows - Validation with no scripts

Drill down in siebel form applet