Hi folks!
I'm making Sesame output ICS Calendar files through a mass update, and I'm almost there. I can create a ICS file that is read by a desktop, but not a mobile device.
Working backwards from a working ICS file on my cell phone, it appears that @newline() creates a CRLF line break, where the mobile friendly file I can create uses LF ... so I tried replacing @newline() with @chr(10), which should have done it ... but no dice. When I open the ICS file created, it's still coming up as CRLF.
Any suggestions?
stat vFileName as string
stat vData as string
stat vSubject as string
stat vMessage as string
stat n as int
stat q as int
stat vStaffInfo as string
stat vDBID as string
stat vCallDate as date
stat vCallTime as string
stat vEndTime as string
stat vCallInvite as string
stat vContact as string
stat vSummary as string
stat vBody as string
vStaffInfo = @xlookupsourcelist(@FN,@userid,"Staff Screen!StaffRef","staffname;staffemail;staffext")
vCallDate = @promptForUserInput("Scheduled Call Date?",@serverdate())
vCallTime = @PromptForuserinput("Scheduled Call Time?",@servertime())
vCallInvite = @PromptForUserInput("Schedule For",@accessstringarray(vStaffInfo,2))
vContact = @PromptForUserInput("Person To Call",DBName)
vSummary = @PromptForUserInput("Subject of Calendar Reminder?","Scheduled Call"
vBody = @PromptForUserInput("Body of Calendar Invite?","We need to arrange to speak with you at your earliest convenience -- please accept this calendar invite or reschedule for a time you are available. Please contact " + @accessstringarray(vStaffInfo,1) + " at " + @accessstringarray(vStaffInfo,3) + " or at " + @accessstringarray(vStaffInfo,2))
if vCallDate <> "" and vCallTime <> "" and vCallInvite <> ""
{
vFileName = "S:\Data\RawData\" + DBID + "-" + @num(@serverdate()) + "-" +@num(@servertime()) + ".ics"
vEndTime = @sum(@tonumber(@num(vCalltime)),15)
FileDelete(vFileName)
q = FileOpen(vFileName)
FileSeek(q,0)
vData =
"BEGIN:VCALENDAR" + @chr(10) +
"VERSION:2.0" + @chr(10) +
"BEGIN:VEVENT" + @chr(10) +
"DTSTART:" + @num(vCallDate) + "T" + @sum(@tonumber(@num(vCalltime)),0) + "00Z" + @chr(10) +
"DTEND:" + @num(vCallDate) + "T" + vEndTime + "00Z" + @chr(10) +
"SUMMARY:" + vSummary + @chr(10) +
"DESCRIPTION:" + vBody + @chr(10) +
"END:VEVENT" + @chr(10) +
"END:VCALENDAR"
Writeln(vData)
FileWrite(q,vData)
FileClose(q)
n = @sendmail("mail.kingstondc.com",vSummary,@accessstringarray(vStaffInfo,2),vCallInvite,"","",vBody,"bwettlaufer@kingstondc.com","SECRETPASSWORD",vFileName)
}
Else
{
@msgbox("Can't Schedule Call","Without A Time and Date","Try Again")
}