| Back | Main view | Parent doc
Scan button
Let's take a look at the code under Scan button:
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Set IMiSCurrUIdoc = workspace.CurrentDocument
IMiSInitProfile("")
result% = IMiSScanObject(IMiSCurrUIdoc, False, True, "") 'scan new IMiS object; returns 0 if everything is OK
End Sub
Declaration:
Function IMiSScanObject(SelectedUIDoc As NotesUIDocument, ShowStorageSelectionDialog As Variant, ShowObjectDescriptionDialog As Variant, DefaultDescription As String) 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.
- SelectedUIDoc is the Notes front end document where we want to create new IMiS object with Scan process.
- With ShowStorageSelectionDialog (True or False) we can select if user is presented with dialog for selecting storage server, where image will be saved. List of servers is built automaticlly from IMiS Administration database (descriptions of storage servers are in the list. If False, then default storage server from "IMiS Setup" document or user's storage server setting from IMiS Administration database is used.
- With ShowObjectDescriptionDialog (True or False) we can select if user is presented with dialog for object description.
- DefaultDescription presents default object description. This value will be used for object description automaticlly if ShowObjectDescriptionDialog is False. Otherwise user will get it in object description dialog and will be able to change it.
As we can see, we have some new features even inside parameters of IMiSScanObject function. Storage server can be selected "on the fly", description of the object can be defined programatically (i.e. based on some field value in Notes document), dialog for object description can be hidden, etc. 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 Scan process based on some values in current Notes document
- or can check user roles and provide own enhanced security features
- etc
| Back | Main view | Parent doc