Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Unable to send document link to email account

Posted on 2004-08-17
2
Medium Priority
?
326 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 120 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

722 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