Unable to retrieve data from backend document

5 pts.
Tags:
@DBLookup
 I have some issue while retrieving data from the back end document. The back end document contains two fields. First field is version name which is a text field and second field is version details which is a rich text field. In the front end document if i enter the version name it will automatically retrieve the attachment from back end documnet and places it in the corresponding field in the cuurent document.
 
              If the second field is text field then we are able to retrieving the values from backend document. But in case of richtext field only we are unable to retrieve the value. The attachment size in the rich text field is in MB's.  The richtext field value is not listed in the view column.
 
           I used lotusscript code to extract the file to local hard disk. But after extracting the file i am unable to attach that file to corresponding field in the front end document. Below code is used to extract the file from backend document to local harddisk drive.
 
Dim ws As New NotesSession
 Dim db As NotesDatabase
 Dim view As NotesView
 Dim doc As NotesDocument
 Dim rtitem As NotesRichTextItem
 Dim object As NotesEmbeddedObject
 
 Set db = ws.CurrentDatabase
 Set view = db.GetView("viewname")
 Set doc = view.GetFirstDocument
 Set rtitem = doc.GetFirstItem( "fieldname" )
 
 If ( rtitem.Type = RICHTEXT ) Then
  Forall o In rtitem.EmbeddedObjects
   If ( o.Type = EMBED_ATTACHMENT ) Then
    Call o.ExtractFile( "D:" & o.Source )
    
    Call doc.Save( False, True )     
   End If
   
  End Forall
 End If
 
             By using above code we are extract the file to local hard disk drive. After this we are unable to attach file to the current document. The above code was written in the  Field Existing event.
 
    For file attachment i used the below formula language code.
 
    @Command([EditGotoField];"fieldname");
    @Command([EditInsertFileAttachment];"D:filename.txt";0)
 
  Above mentioned codes working fine while executing them seperately.The main issue is we are unable to execute both the codes same time. The file extract code is in Script launguage and file attachment code is in formula language.

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
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

Discuss This Question:  

 
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.

REGISTER or login:

Forgot Password?
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

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.

REGISTER or login:

Forgot Password?
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

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

Following