Creating meetings with LotusScript

From a custom database, I am sending meetings out to people’s mail files. I have this working generally OK - I send an Appointment to the chair, and a Notice to each invitee, and I make sure ApptUNID matches and everything seems to work mostly fine. I have come up with an issue though:

The chair reschedules the meeting. An invitee who hasn’t accepted the original invite, then tries to accept the original invite after the meeting has been rescheduled. This invitee gets this message:

“The entry that has been rescheduled is no longer in your calendar. Should Notes recreate the entry so that it can be rescheduled? (Note that recreating the entry may take some time)”

When I try to recreate this scenario with a manually created meeting, the message I get is something like:

“You have not accepted the meeting invitaion but there is a reshcedule. Would you llike to open the reschedule now?”

Does anyone have any idea what I might be missing with the meetings that I create with LotusScript?

Any help greatly appreciated.

I have seen this document and tried everything I can think of based on it:

http://www-1.ibm.com/support/docview.wss?rs=463&context=SSKTMJ&dc=DB520&uid=swg21229486&loc=en_US&cs=UTF-8&lang=en&rss=ct463lotus

It works OK the way it is, nothing is truly broken, it would just be very nice to get the meetings created by LotusScript to behave exactly the same as manually created ones. Thanks again for any help.

Subject: creating meetings with LotusScript

how can we help you unless we’ve seen what you’ve done so far? Post your code.

Subject: something like this:

'create email	Set Letter = db.CreateDocument

Letter.Form = "Appointment"



'set email headers

Letter.Principal = Chair

Letter.ReplyTo = Chair

Letter.SendTo = Chair

Letter.Subject = Subject



'set calendar entry fields

Letter.ApptUNID = ApptUNID

Letter.AppointmentType = "3"

Call Letter.ReplaceItemValue( "_ViewIcon", 158 )

Letter.Topic = Subject

Letter.Chair = Chair

Letter.RequiredAttendees = Invitees



Letter.StartDateTime = StartDate

Letter.StartTimeZone = TimeZone

Letter.EndDateTime = StartDate

Letter.EndTimeZone = TimeZone

Letter.CalendarDateTime = StartDate



'set body

'blah blah blah



Call Letter.Send( False )

That sends the meeting to the chair.

Here are the only differences for what gets sent to the invitees:

Letter.Form = "Notice"



Letter.SendTo = Invitee

Letter.Subject = "Invitation: " & Subject & " (" & Format( StartDate, "mmm d hh:mm AM/PM" ) & ")"


Letter.NoticeType = "I"

Call Letter.ReplaceItemValue( "_ViewIcon", 133 )

That all pretty much works: invitees get invites, they can accept, and they show as accepted in the chair’s version of the meeting.

Any rescheduling though and things start to go a little sideways :frowning:

Subject: RE: something like this:

have you searched this forum for pointers on how to create a meeting invitation via lotusscript? There are lots of examples and many required fields to take into consideration.

Subject: have I searched?

Yes I have:

repeating meetings - not something I’m worried about, but did try the $CSWISL, $SMTPKeepNotesItem, $WatchedItems, $CSVersion fields. Didn’t seem to make any difference to the function of anything, and if I didn’t add them in code they appeared on the resulting mail file docs anyway. That seems to happen with a lot of the $ fields, which makes me assume that I don’t really need to set them in my code. But I have still experimented with them anyway, because my problem probably is buried in one or more of these. No luck so far! Just looking for helpful pointers.

sequence number, also created automatically, and i only want to create the original meeting and then hand off rescheduling and whatnot to the built in mailfile stuff, I don’t want to create any of that stuff through code. No difference if I set this field in my code or not.

another helpful post by Paul K Smeardon :wink:

*don’t take that the wrong way, I do appreciate any reply! And I do see that you are prolific with your help here in this forum, thank you.

someone else says they got it working, sounds kind of like what I have so far, wish there was a little more substance here!

looked at that tech note

much better than the tech note above!

various huge chunks of code, I have trouble beleiving that it is required to set all of these fields (set $mailer? really?), but even still I have experimented with big chunks of them with no noticeable change, still mostly works just the way it does without them:

Can anyone point me to documentation on which fields are actually required to be set if you are generating these things with LotusScript? As opposed to lists of every field involved, including ones that will be set by the server and that you can’t really set even if you want to? Is there anyone out there who really has this stuff nailed?

Subject: getting somewhere…

Invitee gets original inviteInvitee opens invite, does nothing, closes

Invitee tries to open invite again - document has been deleted

What seems to happen is the mail db deletes and recreates the document, with the UNID of the new document changed to match the ApptUNID of the original invite - no other changes. Once this happens, everything works great, ie the (new) original invite’s UNID matches ApptUNID so that any further rescheduling etc can find the original invite by ApptUNID.

How can I ensure that the original invite I send out arrives in the invitee’s mail db with the correct UNID? Can I do something with $MessageID or $Orig, or are those created in mail routing and untouchable in my originating LotusScript code?

I will experiment and if I come up with anything useful I will post the results.

Subject: all that seems to be required:

I seem to have gotten this to work well, and it’s surprisingly simple. One thing I haven’t been able to figure out, and I’m not even sure it’s possible (no manual mechanism to copy anyway), is how to format an update to the chair to get new invitees added. If anyone has done that, please let me know how it works, I’d really appreciate it.

This is only to kick off a meeting, once it has been created and everyone has an invite, it falls back to manual for scheduling resolution etc. It can still save people time though if they regularly have to schedule meetings, and pick various different invitees out of a big fat address book, especially if the meeting details are already stored somewhere else anyway and can just be auto populated, and use a form letter for the Body. The nice thing is that you can personalize the Body for each invitee - you can’t do that manually.

common fields:

Topic

Chair

RequiredAttendees

StartDateTime

StartTimeZone

EndDateTime

EndTimeZone

CalendarDateTime

Body

To send the meeting to the chair:

Form = “Appointment”

AppointmentType = “3”

_ViewIcon = 158

To send an invite:

Form = “Notice”

AppointmentType = “3”

NoticeType = “I”

_ViewIcon = 133

That’s it!

The only trick is to make sure you set UNID to match on all of them (I used the UNID of the doc created for the chair, which makes sense, but you can use any UNID really). It all works great, accept/deny/reschedule, showing in the calendar, pretty much everything.

I had started out setting ApptUNID to match, but that gets you stuck where you have to open the original invite first (so it can be automatically recreated to set UNID to match ApptUNID) or else no rescheduling etc will work. Then I figured out to just set UNID directly, and then I tested and confirmed that ApptUNID isn’t even required.

There you go, HTH :slight_smile: