IsViewReadOnly Method for an Application

You can use the IsViewReadOnly method to determine if a view is read-only. This method returns the following information:

  • TRUE if the view is read-only

  • FALSE if the view is not read-only

If this method does not return TRUE or FALSE, then an error occurred. If this method does not return TRUE or FALSE, then your script must provide a handler.

Format

Application.InvokeMethod("IsViewReadOnly",viewName)

The following table describes the arguments for the IsViewReadOnly method.

Argument Description

viewName

The name of a view. You can include the name of this view in double quotes or in a variable that contains the name of the view.

Usage

You can set a view as read-only for a particular responsibility in the Responsibility Administration view. You can use the IsViewReadOnly method to determine if a view is read-only for the current responsibility before you attempt to edit a field.

Siebel CRM does not automatically set a button to read-only when that button resides in a view that is read-only. You can use the IsViewReadOnly method to set a button to read-only in a view where IsViewReadOnly returns TRUE.

Used With

To use this method, you can use an Application.InvokeMethod call with the following interfaces:

  • Browser Script

  • COM Data Control

  • COM Data Server

  • Siebel Java Data Bean

  • Mobile Web Client Automation Server

  • Server Script

Examples

The following example for Siebel eScript determines if the active view is read only:

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.");

}