Manage Learn to apply best practices and optimize your operations.

Forcing frameset launch on database open

Forcing frameset launch on database open

I had problems with various databases resetting their database launch properties to "restore as last viewed by user". Went onto and saw that many were having same problem. Having put a pretty consistent appearance together on all databases and interfaces I have developed since the R5 upgrade, this drove me crazy....not to mention the fact that views often launch within framesets containing actions that are necessary to functional database use. Without the frameset, therefore, the database is sometimes unusable to the average end-users. I was tired of doing a daily browse through the properties tabs of multiple databases and resetting launch properties that no one could have changed, an R5 bug....and all the phone calls that went with it. This code did the trick.

Place in the postopen of the database script. You can add as many conditions as you need, and must modify to suit your database. I'm using it with the database properties set to open the lower security, or default, frameset.

Sub Postopen(Source As Notesuidatabase)
	Dim ns As New NotesSession
	Dim workspace As New NotesUIWorkspace
	Dim ndb As NotesDatabase
	Dim nacl As NotesACL
	Dim naclEnter As NotesACLEntry  
	Dim level As Integer
	Dim intFlag1 As Integer
	Dim intFlag2 As Integer
	Set ndb = source.Database
	Set nacl = ndb.ACL	
	level = ndb.QueryAccess(ns.UserName)
	Set naclEnter = nacl.GetEntry( ns.UserName )
	intFlag1 = naclEnter.IsRoleEnabled("<DesiredRole1>")
	intFlag2 = naclEnter.IsRoleEnabled("<OptionalAdditionalRole>")	

 'Check levels and roles, open frameset

	If level > 2  And  (intFlag1 Or intFlag2) Then			
		Call workspace.OpenFrameset("Administrator Frameset")			
		Call workspace.OpenFrameset("Employee Frameset")
	End If	
End Sub

Dig Deeper on Domino Resources - Part 8

Start the conversation

Send me notifications when other members comment.

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 ...