Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

PreviousPrevious NextNext


Estelle 2 Morin 16.Feb.12 01:28 PM a Web browser
Domino Designer 7.0.2 Windows XP


Hi!

I want to send a button in a email to a blackberry and it doesn't appear. When a send the button in a email to a computer, it work.

Is someone can help me?

This is my code:
Sub Click(Source As Button)
Dim newdoc As notesdocument
Dim liendoc As notesdocument
Dim stream As NotesStream
Dim uidb As notesuidatabase
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim ws As New NotesUIWorkspace
Set uidb = ws.CurrentDatabase
Dim uidoc As notesuidocument
Set uidoc = ws.CurrentDocument
Dim doc As NotesDocument
Set doc = uidoc.Document
Dim view As notesview
Set view = db.GetView("Memo")
Set dc = view.GetAllDocumentsByKey("Memo")
Call dc.removeall(True)

Set workspace = New NotesUIWorkspace
Set db=session.CurrentDatabase
laction_num=Cint(uidoc.FieldGetText("curact_num"))
Set dialogNote = New NotesDocument ( session.CurrentDatabase )
Select Case laction_num
Case 1 : flag=workspace.Dialogbox("DialogBox1", True, True,,,,, "" ,dialogNote)
Case 2 : flag=workspace.Dialogbox("DialogBox2", True, True,,,,, "" ,dialogNote)
Case 3 : flag=workspace.Dialogbox("DialogBox3", True, True,,,,, "" ,dialogNote)
End Select
cuser=dialogNote.current_user
cuserNomComplet=dialogNote.current_userNomComplet
Set newdoc=db.CreateDocument

Set stream = session.CreateStream

stream.WriteText ({<?xml version='1.0' encoding='utf-8'?>})
stream.WriteText ({<!DOCTYPE document SYSTEM 'xmlschemas/domino_7_0_1.dtd'>})
stream.WriteText ({<document xmlns='http://www.lotus.com/dxl' version='7.0' maintenanceversion='1.0' })
stream.WriteText ({replicaid='8525715600467D15' form='Memo'>})
If cuserNomComplet(0) = "" Then
stream.WriteText ({<item name='sendTo'><text>} + cuser(0) + {</text></item>})
Else
stream.WriteText ({<item name='sendTo'><text>} + cuserNomComplet(0) + {</text></item>})
End If
stream.WriteText ({<item name='subject'><text>} + "Le dossier " & doc.emprunteur(0) & " amendement " & doc.amendement(0) & " vous a été recommandé" + {</text></item>})
stream.WriteText ({<item name='typeEntreprise'><text>} + doc.typeEntreprise(0) + {</text></item>})
stream.WriteText ({<item name='emprunteur'><text>} + doc.emprunteur(0) + {</text></item>})
stream.WriteText ({<item name='amendement'><text>} + doc.amendement(0) + {</text></item>})
stream.WriteText ({<item name='Body'><richtext>})
stream.WriteText ({<par def='1'><button width='2in' widthtype='maximum' maxlines='1' wraptext='true' bgcolor='system'>})
stream.WriteText ({Recommander au Crédit<code event='click'>})
stream.WriteText ({<lotusscript>})
Call stream.WriteText ({Sub Click(Source As Button)},0)
Call stream.WriteText ({Dim db as NotesDatabase},0)
Call stream.WriteText ({Dim session as new notessession},0)
Call stream.WriteText ({Dim ws As New NotesUIWorkspace},0)
Call stream.WriteText ({Dim uidoc as Notesuidocument},0)
Call stream.WriteText ({set db = session.CurrentDatabase},0)
Call stream.WriteText ({set uidoc = ws.currentdocument},0)
Call stream.WriteText ({set doc = uidoc.Document},0)
Call stream.WriteText ({Set newdoc = New NotesDocument(db)},0)
Call stream.WriteText ({newdoc.form = "Memo"},0)
Call stream.WriteText ({newdoc.subject = "Dossier recommandé"},0)
Call stream.WriteText ({newdoc.emprunteur = doc.emprunteur(0)},0)
Call stream.WriteText ({newdoc.amendement = doc.amendement(0)},0)
Call stream.WriteText ({newdoc.sendTo ="Estelle MORIN/CCD/Desjardins"},0)
Call stream.WriteText ({Call newdoc.Send(False)},0)
Call stream.WriteText ({Messagebox "La recommendation a été envoyée"},0)
Call stream.WriteText ({End Sub},0)
stream.WriteText ({</lotusscript></code></button></par>})
stream.WriteText ({</richtext></item></document>})

Set dmp = session.CreateDXLImporter(stream, db)
dmp.DocumentImportOption = DXLIMPORTOPTION_CREATE
dmp.Process
Set body = newdoc.CreateMIMEEntity
Call body.SetContentFromText (stream, "text/html;charset=iso-8859-1",ENC_NONE)

Call view.Refresh
Set lienDoc = view.GetFirstDocument
If lienDoc Is Nothing Then
Messagebox "Le courriel n'a pas été crée"
Else
Call uidoc.Close
Set uidoc = ws.EditDocument(True,liendoc)
If cuserNomComplet(0) = "" Then
Call uidoc.fieldsettext("sendTo",cuser(0))
Else
Call uidoc.fieldsettext("sendTo",cuserNomComplet(0))
End If
Set doc = uidoc.Document
doc.sendto = "Estelle MORIN/CCD/Desjardins"
Call uidoc.Close
Call doc.Send(False)
End If
End Sub








  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite