AppendDocLink in newly created document?

When a user creates a new doc, within the PostOpen event of that, I create a 2nd document in ANOTHER database, then try to put a doclink to it into the a “FoodBeverageDoc” richtext field on the original doc the user is creating… but when the user saves the document, the properties show the field but it’s empty… is what I’m doing not possible? Code is below…

If source.IsNewDoc Then

	Dim doc2 As NotesDocument

	Dim rtitem As NotesRichTextItem

	Set rtitem = New NotesRichTextItem( source.Document, "FoodBeverageDoc" )

	

	

	Dim db2 As New NotesDatabase ("", "")

	Dim session As New NotesSession

	Dim db As NotesDatabase

	Set db = session.CurrentDatabase

	

	db2.Open db.Server, "ResResFoodBev.nsf" 

	Set doc2 = db2.createdocument 'Create document

	doc2.form = "FoodBeverage"

	Call doc2.Save( True, True )

	Call rtitem.AppendDocLink( doc2, "Food and beverage Details" )

End If

Subject: Save and Reopen

Because you are working with righ text on a new document, you will have to save the current document, and then re-open it…

Something like.

doc.save( true, false)

call source.close()

call ws.editDocument( false, doc, false)

cheers,

John