I want to set the document mode onclick dynamically.
When I click a button, the onclick action is "Change Document Mode",In which we have 4 options to select.
- Toggle 2. Read Mode 3. Auto Edit and last is Edit Mode.
But Beside this the computed property button is provided, Below image can make the query more clear.
In the computed property button it is allowed to write ssjs code,
So I am not getting that, what keyword should I return there for all the four option to be in working according to condition.
The sample code which I was trying to get the edit mode is:
var uid = context.getUrlParameter("documentId");
var doc:NotesDocument = database.getDocumentByUNID(uid);
if(doc.getItemValueString("$$disabled") != "true") {
// want to return the Edit Mode
return "Edit Mode "
} else {
// do nothing
return false;
}
Any valuable suggestions would be appreciated.