Siebel Open UI >  Siebel OpenUI - IsViewReadonly In Custom JS is Throwing Error Undefined is not a Function

Siebel OpenUI - IsViewReadonly In Custom JS is Throwing Error Undefined is not a Function

 

APPLIES TO:

Siebel CRM - Version 8.1.1.10 [23021] and later
Information in this document applies to any platform.

GOAL

How to use IsViewReadOnly in custom JS in OpenUI?
 

SOLUTION

Testing with below script threw error "undefined is not a function".

var psObject = SiebelApp.S_App.GetActiveView().GetName();
if(SiebelApp.S_App.InvokeMethod("IsViewReadOnly", psObject) === "False")

TheApplication().InvokeMethod("IsViewReadOnly", viewName) is not working from Browser script.


However as a workaround is to create a server side business service to run the code, make that business service accessible to the client, and then call the business service to get the information

Bug 19821239 has been raised reporting the issue.