Domino Designer
Lotus Domino
Hello, I have a problem with appenddoclink. I have a document that when is saved, automatically send an email to a person, with a link to the document saved. This person, when received the mail, click the link and open the document, after clik in an action and a field of document change his value, and is saved. Well, al works fine when I do it(DB Mananger), the problem arrive when other person do it (Editor), because all work fine, except change value of a field. When after they open the document, the field has the old value, no new one. This is the code to sent the email: If doc_act.FieldGetText("purch_estado") = "PENDIENTE" And doc_act.IsNewDoc Then Dim memo As NotesDocument Dim docu As NotesDocument Dim rtitem As NotesRichTextItem Set bd=sesion.CurrentDatabase Dim enviar(1 To 3) As String enviar(1)= doc_act.FieldGetText("vb_responsable") Set memo=bd.CreateDocument() memo.form="Memo" memo.sendto=enviar 'se envia a todos los que estan en el array enviar memo.subject="Solicitud de Pedido n? " & doc_act.FieldGetText("numero") Set rtitem=New NotesRichTextItem(memo,"Body") Set docu=doc_act.Document Call rtitem.AppendDocLink(docu, "Solicitud de Pedido") memo.Send(False) Messagebox "Se ha enviado un correo al responsable", MBOK,"Correo enviado" End If Please, it is very important for me. Thanks in advance.

Answer Wiki

Thanks. We'll let you know when a new response is added.

I see 2 points :

Fist, check the save procedure of the modified document (is it Ok or not ? If the user access the document without the doclink then modify and save it, is it OK ? If not, its a problem of access rights.)

Second, is your NSF replicated ?
It is possible that the doclink point to a document in a replica et the modification is saved in that replica. But when you check the modified document, you are in an ohter replica …

Discuss This Question: 4  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • MHanson
    I think you need to save doc_act. The first part of your script tests to see if doc_act is a new document, if this is the case then doc_act.Document does not exist when you assign it later in your code (Set docu=doc_act.Document). Good Luck, Mike
    35 pointsBadges:
    Hi, If user access the document directly, he can change the field without problem. The database hasn't replicates. And I've save the doc_act before, create the new memo document, and the problem persists. Thanks.
    0 pointsBadges:
  • Stiletto
    If I understand correctly: 1. You've got code that sends an email with a doclink. a. The user gets the email with the doclink. b. When clicking on the doclink, the appropriate document is opened. Conclusion: The problem's not with the code that generates the email. 2. When the user accesses the document through the doclink, something that's supposed to happen doesn't happen, but when the user accesses the document directly, everything's fine. So, what's the difference? Well, for one thing, when you access a document through a doclink, any code that's in the Database script events like PostOpen doesn't execute. Do you have anything there? Another thing that's different is your access levels. Check the form for areas that are restricted somehow.
    5,545 pointsBadges:
    Thanks for all guys, The problem is resolved now. Someone has changed some code in a section restriction. Thanks again.
    0 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: