Edit profile document from within nested framesets
Overcome a limitation in the Notes client.
In order to provide custom Welcome page that contains personalized user features in server database that is framed by bookmarks.nsf, you must overcome a limitation or bug in the Notes client. The problem is that a hotspot button located within a nested frameset of a database that is different from the parent frameset, loses its database context for Command EditProfile or the Script EditProfile method. Those commands or methods, used in this context, generate an error: Invalid nor nonexistent document. This could prevent a designer from using profile documents for personalization of Welcome pages.



Download: IT Certifications 101
Inside this exclusive essential guide, our independent experts break down which IT certifications are worth your time and effort, and how to get started obtaining them to further your career— including specific certifications that any cloud or desktop pro should seriously consider.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
You also agree that your personal information may be transferred and processed in the United States, and that you have read and agree to the Terms of Use and the Privacy Policy.
Sub Click(Source As Button) ' +------------------------------------------------------------ ' | WORK-AROUND TO GET PROFILE DOCUMENT FROM WITHIN NESTED FRAMESET: ' | This script is used to get a Profile document was necessary ' | because of a bug or limitation in Notes regarding actions ' | from within nested framesets from different databases. The ' | @Command([EditProfile] or EditProfile method assumes the current ' | database. However, when such actions are placed on page or form in ' | a nested frameset, the database context is erroneously identified ' | as the parent frameset. Without the following workaround code, ' | such actions result in an error: "invalid or nonexistent document", ' | because the desire Profile document is in the database of the ' | parent frameset. ' +------------------------------------------------------------ ' | APPLICATION ENVIRONMENT: ' | Bookmark.nsf contains frameset "-Welcome-", which has been customized ' | to contain only one frame, "WelcomeContent". The contents of the ' | "WelcomeContent" frame consists of a named element that is a frameset ' | in another database "wvusHome.nsf". This second database serves ' | customized Welcome pages for the organization. Its frameset ' | "setMainWelcome" contains frame "frameMainLotusLogo", which provides ' | content from named element, "pageLotusNotesWithButton". On this page ' | is the hotspot button that launches the following script: ' +------------------------------------------------------------ Dim ws As New NotesUIWorkspace Dim ses As New NotesSession Dim db As New NotesDatabase ("","") Dim doc As NotesDocument Dim uiDoc As NotesUiDocument Dim vOK As Variant Dim sReplica, sServer As String sServer = "YourServer" sReplica = "1234567812345678" vOK = db.OpenByReplicaID(sServer,sReplica) If vOK = False Then vOK = db.OpenByReplicaID("",sReplica) 'try local End If 'Get profile document if Db was successfully openned If vOK Then Set doc = db.GetProfileDocument("MyProfile", ses.UserName) Set uiDoc = ws.EditDocument(True,doc) End If End Sub
Start the conversation
0 comments