I am using this wonderful snippet by Ulrich Krause for creating a calendar entry using XPages. The snippet works as defined, however, we were looking for a solution to also add required attendees using the same code and hence we added this small snippet to the code to do the same:
Added this snippet to the mentioned Ulrich Krause Code
/**
* @description
* sets the required users for the calendar
*/
this.setMembers = function (members:java.util.Vector) {
this._members = members;
}
// And further we set the RequiredAttendees field as shown below
var item:NotesItem = null;
item = doc.replaceItemValue('RequiredAttendees', this._members);
item.setNames(true);
//Also tried setting field "EnterSendTo" as mentioned in few solution with no success
All the fields are set correctly (we verified this by checking the document properties view), however, as soon as we open the calendar entry the RequiredAttendees field just disappears as if it was not there. It seems like some calendar specific function just run after the entry is open and tries to recalculate the value based on something we are not clearly aware of.
Any help in this direction would be really be helpful.