IsViewReadOnly Method
You can use the IsViewReadOnly method to test whether a view is read-only
Syntax
Application.InvokeMethod("IsViewReadOnly",viewName)
viewName: The name of a view, as defined in Siebel Tools, in double quotes or a variable containing the name of a view.
Returns:Returns TRUE if the view is read-only, else it returns FALSE. If neither of these values is returned, then an error has occurred. Your script must provide a handler if neither TRUE nor FALSE is returned.
Sample Code :
function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)
{
var sviewname = TheApplication().ActiveViewName();
if (TheApplication().InvokeMethod("IsViewReadOnly",sviewname) == "TRUE")
{
if (MethodName == "<<CustomMethod>>")
CanInvoke = "FALSE";
else
CanInvoke = "TRUE";
return CancelOperation;
}
return (ContinueOperation);
}
regards
jo
No comments:
Post a Comment