LS - ComposeDocument

I am using the following code to force a user to create a document if an Active one does not exist in the db:----------------------------------------------------------

Function IsCompVehicleUser As Variant

Dim s As New NotesSession

Dim ws As New NotesUIWorkspace



IsCompVehicleUser = False	'reset the value each time

key = s.UserName ' gets the active user name

Set user = s.CreateName(key)

key1 = user.Abbreviated	'needed to lookup the user in the views

Set db = s.CurrentDatabase

Set v = db.GetView("($AllUsers)")

Set doc = v.getdocumentbykey(key1)

Set item = doc.GetFirstItem("UserDef3")  'checks to see if user has a company vehicle



Forall x In item.Values 

	If x = "Y"  Then IsCompVehicleUser = True

	If IsCompVehicleUser  = True Then

		If  IsDRCAActive = False  Then

			Msgbox "You must first complete a Driver Record Authorization before continuing.",0,"Boomerang Notice"

			Call ws.ComposeDocument( "", "", "DRCA" )	

			Msgbox "You can now continue working in Boomerang"

		End If

	End If

End Forall

End Function


Everything works fine, but I want to stop the user from proceeding until the new doc is completed and saved. Any ideas?

Thanks

Tim

Subject: LS - ComposeDocument

you could put the form for the new doc onto a dialog, then you can trap the ‘submit’ of thid dialog and continue after that.

then its just a case of having mandatory fields on teh dialog to force the user to fill out the required stuff.

Subject: RE: LS - ComposeDocument

Thanks Mark. I’ll look at that route.Tim