I have successfully created a script that creates a new event when a new lead is created and gives it a start date and time based on a custom date/time field in the lead layout. I am having issues with the start time though and also wish to add an "if condition" where the "State" field will determine what the start time of the event is. Here is a portion of the Deluge script relating to the start time of the new Event. Thanks in advance!
dateFieldDate=input.Firstappointment.toTime("ddMMyyy HH:mm");
if(input.State == "QLD")
{
startTime=dateFieldDate.toTime(("AEST"));
}
else if(input.State == "NSW")
{
startTime=dateFieldDate.toTime(("AEDT"));
}
else
{
startTime=dateFieldDate.toTime(("AWST"));
}
endTime=startTime.addHour(1);
subjectname=input.State + " _ " + input.FirstName + " " + input.LastName + " + " + input.PartnerName;