Solved

Unable to send document link to email account

Posted on 2004-08-17
2
320 Views
Last Modified: 2013-12-18
I want user to send this document link to other user email when user click on a mailsend button.
There is a names field called mailto which contains multiple user email addresses.
Thus when user has finished choosing the selected recipients, he will click on the mailsend button to send the document to them. But when click on mailsend button, i get the following error : Couldn't get dafault view id for database

Pls help.
Thanks.

Code for mailsend button:

Sub Click(Source As Button)    
      
      Dim ws As New NotesUIWorkspace
      Dim uidoc As NotesUIDocument
      Set uidoc=ws.CurrentDocument
      Call uidoc.Save
      Dim session As New NotesSession
      Dim db As NotesDatabase
      Dim newDoc As NotesDocument
      Dim curdoc As NotesDocument
      Dim rtitem As NotesRichTextItem
      Set db = session.CurrentDatabase
      Set curdoc = uidoc.Document
            
      Set newDoc = New NotesDocument(db)
      
      newDoc.Form = "Memo"              
      newDoc.Subject = "<From Sales Meeting DB>" + "[" + uidoc.FieldGetText("Group") + "]" + uidoc.FieldGetText("Subject")
      
      pText ="The following was issued from " + uidoc.FieldGetText("pic") +Chr(10)+Chr(10)_          
      + "   <Subject>  : "+ uidoc.FieldGetText("Subject") + Chr(10) + Chr(10)_
      + "   <Group>  : "+ uidoc.FieldGetText("Group") + Chr(10)_
      + "   <Region>  : "+ uidoc.FieldGetText("Customer") + Chr(10)_
      + "   <Category>  : "+ uidoc.FieldGetText("Category") + Chr(10) + Chr(10)_
      + "   <Contents> : " + Chr(10)          
      
      Text_2 = "    Sales Meeting Document Link (for Notes user only) ->  "
      
      Set rtitem = New NotesRichTextItem(newDoc, "Body")
      
      Call rtitem.Appendtext( pText )      
      Call rtitem.AddNewLine(1)    
      Call rtitem.Appendtext( Text_2 )    
      Call rtitem.AppendDocLink(curdoc,"")       
      Call newdoc.Send(False,uidoc.FieldGetText("mailto"))
                    
      
      Messagebox("Mail send completed.")
      
      Call uidoc.Save()    
      Call uidoc.close
            
      Exit Sub

      
End Sub
0
Comment
Question by:kopibean
  • 2
2 Comments
 
LVL 19

Expert Comment

by:madheeswar
ID: 11827448
I suspect ur getting error here:
pText ="The following was issued from " + uidoc.FieldGetText("pic") +Chr(10)+Chr(10)_          
     + "   <Subject>  : "+ uidoc.FieldGetText("Subject") + Chr(10) + Chr(10)_
     + "   <Group>  : "+ uidoc.FieldGetText("Group") + Chr(10)_
     + "   <Region>  : "+ uidoc.FieldGetText("Customer") + Chr(10)_
     + "   <Category>  : "+ uidoc.FieldGetText("Category") + Chr(10) + Chr(10)_
     + "   <Contents> : " + Chr(10)  

And debug the script and you can see which line the error comes.
0
 
LVL 19

Accepted Solution

by:
madheeswar earned 30 total points
ID: 11827744
If you have any views, make it a defualt view and test this code.

I Tested your code and it looks OK.
if you don't have any views, then create a view and make it as default.

IGNORE my first post.

THANKS.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now