calendar - Cannot find function createEvent in object -


i have no idea why getting error... of other code in script commented out... appreciated!

error message: typeerror: cannot find function createevent in object . (line 16, file "code")

function createevent(test)  { var cal = calendarapp.getcalendarsbyname(test); var title = 'script demo event'; var start = new date("april 5, 2013 08:00:00 pdt"); var end = new date("april 5, 2013 10:00:00 pdt"); var desc = "created using google apps script"; var loc = "script center"; var event = cal.createevent(title, start, end, {description:desc, location:loc}); }; 

(friend figured out) these 2 not play together....

createevent , getcalendarsbyname

createevent must use getcalendarsbyid


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

php - HTTP_REFERER woes: How can I allow access to a specific page, only when a visitor has visited another specific page beforehand? -