Plan an outgoing call
•
Version: 10
Some tooltip text!
• 1 minute to read
• 1 minute to read
The type is 5 for outgoing calls (same as incoming). However, to control the direction, you need to use the Task MDO list table.
List available task types
SearchEngine se;
se.addFields("Task", "Task_id,name");
printLine(se.executeTextTable());
Add call to the todo list
DateTime deadline;
deadline.addDay(2);
NSAppointmentAgent appointmentAgent;
NSAppointmentEntity newCall = appointmentAgent.CreateDefaultAppointmentEntityByTypeAndAssociate(5, 1);
newCall.SetDescription("Call to book rental car");
newCall.SetAssignmentStatus(11);
newCall.SetEndDate(deadline);
NSTaskListItem task;
task.SetTaskListItemId(3);
newCall.SetTask(task);
newCall = appointmentAgent.SaveAppointmentEntity(newCall);
Update when you do make the call
Parameters to UpdateAppointment():
- appointment_id
- start time
- end time
- status
- type
- owner (associate_id)
DateTime start;
DateTime end;
NSAppointmentAgent appointmentAgent;
appointmentAgent.UpdateAppointment(88, start, end.addMin(20), 0, 0, 5);