Doclink search

something’s wrong with my script in querysave:

If source.document.HasItem(“Reason”) Then

Set varBody = source.document.GetFirstItem(“Reason”)

If source.document.HasItem(“$Links”) Then

 Set varLinks = source.document.GetFirstItem("$Links") 

 Exit Sub

Else

 Messagebox "Please attach the link"   

End If

End If

i wanted to find the attached doclink in the Reason Field before saing the document.If not found in th Reason field, it will prompt a message.

help!

Subject: Doclink search

Unfortunately, the rich text is not written to disk until after the save, and the $Links item doesn’t need to exist at all for there to be a doclink. These two facts together make it very unlikely that your QuerySave will work. You may have to do a Post save type check.

Subject: RE: Doclink search

thanks for that…

but i got it already…:slight_smile: i just add a notesuidocument.refresh() in the script.

thanks again…