scripting - Can't setMyStatus with google script -


i have trouble google script. try run script below in form can't set status.

function onformsubmit() {         var form = formapp.getactiveform();         var email_address = form.getresponses()[0].getrespondentemail();         var date = new date("insert-date-here");         var event = calendarapp.getcalendarbyid("calender-id-here").geteventsforday(date);         event[0].addguest(email_address);         var guests = event[0].getguestlist()[0].getemail();         var status = event[0].setmystatus(calendarapp.gueststatus.yes);     } 

the person added calender no problem when row setmystatus comes crashes error, "not user of event". can tell why happening?

i've tried add long sleep , tried fetch event again. if debug can see email of user i'm trying add.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -