Google 脚本创建事件 - 事件描述有问题
Google script create event - issues with event description
这可能是一个 Type
问题,但我似乎无法解决它。
来自表格的代码 运行ning,基于 this:
var eventdescription = 'test';
var event = CalendarApp.getCalendarById(calendarid).createEvent(
eventtitle,
startfull,
endfull,
{description: eventdescription},
{location: eventaddress.toString()}
);
错误:
Cannot find method createEvent(string,object,object,object,object).
我对 location
也有类似的问题,但通过添加 toString()
解决了这个问题。对于 description
,我似乎无法找到解决方案。不也是 string
吗?无论有没有 toString()
.
它都不起作用
省略 {description: eventdescription},
允许脚本 运行 没有问题,但当然在事件中没有描述。
有什么让它发挥作用的想法吗?谢谢!
高级选项需要全部放在同一个大括号内:
var eventdescription = 'test';
var event = CalendarApp.getCalendarById(calendarid).createEvent(
eventtitle,
startfull,
endfull,
{description: eventdescription, location: eventaddress.toString()}
);
这可能是一个 Type
问题,但我似乎无法解决它。
来自表格的代码 运行ning,基于 this:
var eventdescription = 'test';
var event = CalendarApp.getCalendarById(calendarid).createEvent(
eventtitle,
startfull,
endfull,
{description: eventdescription},
{location: eventaddress.toString()}
);
错误:
Cannot find method createEvent(string,object,object,object,object).
我对 location
也有类似的问题,但通过添加 toString()
解决了这个问题。对于 description
,我似乎无法找到解决方案。不也是 string
吗?无论有没有 toString()
.
省略 {description: eventdescription},
允许脚本 运行 没有问题,但当然在事件中没有描述。
有什么让它发挥作用的想法吗?谢谢!
高级选项需要全部放在同一个大括号内:
var eventdescription = 'test';
var event = CalendarApp.getCalendarById(calendarid).createEvent(
eventtitle,
startfull,
endfull,
{description: eventdescription, location: eventaddress.toString()}
);