Manage Learn to apply best practices and optimize your operations.

Edit profile document from within nested framesets

Overcome a limitation in the Notes client.

This Content Component encountered an error

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.

 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
This was last published in January 2002

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...