| Back | Main view | Parent doc
View button
Let's take a look at the code under View button:
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Set IMiSCurrDoc = workspace.CurrentDocument.Document
EditAccess% = 0
EditAccess% = Cint(IMiSIsUserEditor(IMiSCurrDoc.ParentDatabase.Server, IMiSCurrDoc.ParentDatabase.FilePath, IMiSCurrDoc.NoteID))
IMiSInitProfile("")
result% = IMiSViewObject(IMiSCurrDoc, EditAccess%)
End Sub
Declaration:
Function IMiSViewObject (SelectedDoc As NotesDocument, EditAccess As Integer) As Integer
Return Value:
0 - everything is OK. Scan process has finished with no errors.
-1 - scan process has finished with errors. Most of the errors are reported to user.
- SelectedDoc is the Notes document which has IMiS objects and we want to select one of them from pop-up list
- EditAccess parameter is 1 if user has editor rights on document or 0 otherwise. Editing rights to the Notes document can be determined programatically as it is done under View action - Initialize event of View action and Querymodechange event of the subform. In this case we check that with IMiSlahkoPopravlja variable. So if EditAccess is 1 and if user has rights to edit images (see Restrictions Settings for more details) than edit button in IMiS client will be enabled.
As we can see, we have some new features even inside parameters of IMiSViewObject function. And of course, as already mentioned, developer is able to put some LotusScript code right before or after scanning process - for example:
- developer can restrict user to begin View process based on some values in current Notes document
- or based on object description
- or can check user roles and provide own enhanced security features
- etc.
| Back | Main view | Parent doc