- To avoid the above error when creating an event via Scheduled Script, add the owner along with the organizer :
taskEmp = Get the value of employee/user you want to be the owner of the Event
var rec= nlapiCreateRecord('calendarevent');
rec.neweventRec.setFieldValue('organizer',taskEmp);
rec.setFieldValue('owner',taskEmp);
**Note - When creating a Calendar Event via User Event script the owner field is set automatically by the system as it knows who is creating it unlike Scheduled Scripts.
No comments:
Post a Comment