lotus notes - Calendar Button Entry -


i have button notes calendar entry.

basically creates new entry when 1 clicks on it.

this full script:

sub click(source button)      dim s new notessession     dim db notesdatabase     dim doc notesdocument     dim subject string     dim maildoc notesdocument     dim rtitem notesrichtextitem     set db = s.currentdatabase     set doc = new notesdocument(s.currentdatabase)     set maildoc = new notesdocument(s.currentdatabase)     set ritem = new notesrichtextitem(maildoc, "body")  'modify subject, location, start day , time, end day , time before sending!! '#########################################################################      doc.subject = "hi"     doc.location = "i2-300"     set startdatetime = new notesdatetime("05/29/2014 04:00:00 pm")     set enddatetime = new notesdatetime("05/29/2014 05:00:00 pm") 

'#########################################################################

    doc.from = s.username     doc.form = "appointment"     doc.appointmenttype = "0"     doc.chair = s.username     doc.startdatetime = startdatetime.lslocaltime     doc.enddatetime = enddatetime.lslocaltime     doc.calendardatetime = startdatetime.lslocaltime     doc.timerange = timevalue(doc.startdatetime(0)) & "-" & timevalue(doc.enddatetime(0))     doc.excludefromview = "d"      call doc.replaceitemvalue("_viewicon", 160)     call doc.appenditemvalue("$busyname", s.username)     call doc.appenditemvalue("$busypriority", "1")     call doc.appenditemvalue("$publicaccess", "1")     call doc.save(true,true)      print "an entry event added calendar , e-mail confirmation sent."     msgbox "calendar updated , e-mail confirmation sent.", 64, "success"      'send e-mail confirmation      maildoc.form = "memo"  'modify subject , send '############################################################################        maildoc.subject = "yes - attend - may 29"     maildoc.sendto = ""   '############################################################################     call maildoc.send(false)  end sub 

well question how add description field can insert text , should show under description field in calendar entry.

well tried doc.description didn't work entry not getting updated?

can 1 take look?

mail , calendar forms in notes share many common fields. 1 of fields called body. in appointment form, body field labeled "description". body 1 want.

body rich text field. should use doc.createrichtextitem("body") , methods of notesrichtextitem class work it, instead of using doc.appenditemvalue("body",somevariable).

in future, please bear in mind notes developers can research many questions easily. open mail template in domino designer , @ _calendarentry form. ("appointment" alias.) it's open source. see fields there. scroll way bottom , find "description" label, , below see body field. many things in there messy, body field isn't. , other things might dealing with, worth time study messy bits see how works.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -