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 Notes.net 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")			
	Else
		Call workspace.OpenFrameset("Employee Frameset")
	End If	
End Sub
This was last published in August 2001

Dig Deeper on Domino Resources - Part 8

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.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchDataCenter

SearchExchange

SearchContentManagement

Close