HTML5, CSS3, jQuery, JSON, Responsive Design...

Notes Calendar invitees - hidden web service!

Michael Brown   November 14 2013 02:51:13 PM
I've been working on a Web-based calendar that has an ordinary Notes calendar as its source at the back-end.

I was struggling on how to get the invitee status for a Notes calendar entry.  Digging through the Notes mail file design, there's a lot of undocumented LotusScript classes and methods at use for that purpose.  I managed to lift some of that stuff and got it half-working, but not quite there.  Then I came across a way to get it all put on a plate for me!

First, here's a direct link to my calendar entry itself:

http://184.73.169.93/mail/testmail.nsf/0/09ADB82D7590879300257C22006E7CA6/?OpenDocument

Now, see what happens when I append the "&Form=s_ReadPartStatus" parameter:

http://184.73.169.93/mail/testmail.nsf/0/09ADB82D7590879300257C22006E7CA6/?OpenDocument&Form=s_ReadPartStatus

Wow!  There's the participant statuses served up for me as XML.  Too easy!

I couldn't find a way to get it to produce JSON, so I used the xml2json library to do that, then ran the following jQuery function to map the relevant data to a smaller JSON object:

var jsonObj = $.xml2json(xml);
var mappedObj = $.map(jsonObj.viewentries.viewentry, function(value, index) {
      lineObj = {};
      if (value.entrydata[1].text.value) {
              lineObj.primaryName value.entrydata[1].text.value;
      }
      if (value.entrydata[2].text.value) {
              lineObj.alternateName = value.entrydata[2].text.value;
      }
      if (value.entrydata[5].text.value) {
              lineObj.roleName = value.entrydata[5].text.value;
      }
      if (value.entrydata[7].text.value) {
              lineObj.statusName value.entrydata[7].text.value;
      }
      if (value.entrydata[16].text.value) {
              lineObj.delegee = value.entrydata[16].text.value;
      }
      return lineObj;
});



If you're looking for the s_ReadPartStatus form in your mail file design, you won't find it.  It's actually in iNotes Forms database (iNotes\forms85.nsf).
Comments

1Erik Schwalb  11/15/2013 9:46:09 AM  Notes Calendar invitees - hidden web service!

Are you aware of the new Domino Calendar Service REST API which represents calendar data in both JSON and iCalendar formats?

See { Link } for details.

BTW: This service is now included in Domino 9.0.1

2Mike Brown  11/15/2013 3:03:23 PM  Notes Calendar invitees - hidden web service!

Thanks for that, Erik. That certainly looks *very* interesting!

Unfortunately, I'm unable to test on my own Domino 9 server. I don't have the "Calendar" option on the Enabled Services field of my Web Site document.

I presume that you need to install the Extensions Library to see that? But downloads are disabled for it on the OpenNTF host page!!! I posted that little problem in the OpenNTF feedback.

3Mike Brown  11/20/2013 3:21:04 AM  Notes Calendar invitees - hidden web service!

Okay, I got the Domino Calendar Service REST API now. (My earlier probs with it were all down to my own stupidity.)

There's some pretty cools stuff in there too. I'll post about it when I've investigated further.

4mp3 skull  03/24/2017 4:55:49 PM  Notes Calendar invitees - hidden web service!

{ Link }

About