Setting default appointment time, task type etc. when using SOProtocol to create follow on appointment in SuperOffice Web

Hi,

I am trying to create a follow on appointment in SuperOffice web when an appointment of a certain type is completed.  The appointment dialog should show, and have certain fields pre-populated.  But the user should decide whether or not they want to save or cancel the follow on appointment created on screen.

This is what I have so far.

#setLanguageLevel 3;

EventData ev = getEventData();
log(ev.getInputValues().toJson());

Integer reqTaskTypeId = 52;

Integer appntTask = ev.getInputValue("AppointmentEntity.Task.TaskListItemId").toInteger();
Bool completed = ev.getInputValue("AppointmentEntity.CompletedBool").toBool();

if (appntTask == reqTaskTypeId && completed)
{
  String contactId = ev.getInputValue("AppointmentEntity.Contact.ContactId");
  String personId = ev.getInputValue("AppointmentEntity.Person.PersonId");

  ev.setNavigateTo("soprotocol:diary.day.appointment?&appointment_id=0&contact_id=" + contactId + "&person_id=" + personId + "&task_idx=334&do_by=2021-01-20T16:15:00");
}

This shows an appointment window, with the company and contact set, but I am looking to set other properties such as the appointment time, and the task type etc. (as you can do with the Windows scripting), but I cannot seem to get this to work.  I have tried the following, but it does not set the fields.

ev.setNavigateTo("soprotocol:diary.day.appointment?&appointment_id=0&contact_id=" + contactId + "&person_id=" + personId + "&task_idx=334&do_by=2021-01-20T16:15:00");

Is it possible to do this.  Also is there a list available of all fields you can set.

Many thanks,

Trevor

RE: Setting default appointment time, task type etc. when using SOProtocol to create follow on appointment in SuperOffice Web

when an appointment of a certain type is completedIt sounds like you might be trying to lead a user through a workflow. Do these appointments relate to a sale or project? It that is the case, have you considered using a sales guide or project guide with a suggested appointment? Also, check out the database reference.

Av: Bergfrid Skaara Dias 7. jul 2021