Send a Invite to Outlook with Outsystems

Good Afternoon,


I am trying to send an invite to outlook with outsystems.


I am using this post to get some tips:


https://www.outsystems.com/forums/discussion/9547/sending-an-outlook-calendar-event/


In Server, Action TextToBinary has said in the post, put this text with the correct Date Start and Date End

SyntaxEditor Code Snippet

"BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook MIMEDIR//EN
VERSION:1.0
BEGIN:VEVENT
DTSTART:Year( InDateTime) + If(Month(InDateTime)<10,"0" ,"" ) + Month(InDateTime) + If( Day(InDateTime) < 10, "0","") + Day(InDateTime) + "T" + If(Hour(InDateTime)<10, "0", "") + Hour(InDateTime) + If(Minute(InDateTime)<10, "0", "") + Minute(InDateTime) + "00Z"
DTEND:Year( InDateTime) + If(Month(InDateTime)<10,"0" ,"" ) + Month(InDateTime) + If( Day(InDateTime) < 10, "0","") + Day(InDateTime) + "T" + If(Hour(InDateTime)<10, "0", "") + Hour(InDateTime) + If(Minute(InDateTime)<10, "0", "") + Minute(InDateTime) + "00Z"
LOCATION:My office
CATEGORIES:Business
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:This is a note associated with the
meeting=0D=0A
SUMMARY:Meeting
PRIORITY:3
END:VEVENT
END:VCALENDAR"


The Outsystems gave me this error.

"Syntax error caused by unexpected '0' element in expression.


What am I doing wrong?


Thank you for your time,

FM

Hi,

Looks like you are missing quotes after DTSTART: and DTEND:

"BEGIN:VCALENDAR
PRODID:-//Microsoft Corporation//Outlook MIMEDIR//EN
VERSION:1.0
BEGIN:VEVENT
DTSTART:" + Year( InDateTime) + If(Month(InDateTime)<10,"0" ,"" ) + Month(InDateTime) + If( Day(InDateTime) < 10, "0","") + Day(InDateTime) + "T" + If(Hour(InDateTime)<10, "0", "") + Hour(InDateTime) + If(Minute(InDateTime)<10, "0", "") + Minute(InDateTime) + "00Z" +
DTEND:" + Year( InDateTime) + If(Month(InDateTime)<10,"0" ,"" ) + Month(InDateTime) + If( Day(InDateTime) < 10, "0","") + Day(InDateTime) + "T" + If(Hour(InDateTime)<10, "0", "") + Hour(InDateTime) + If(Minute(InDateTime)<10, "0", "") + Minute(InDateTime) + "00Z" +
LOCATION:My office
CATEGORIES:Business
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:This is a note associated with the
meeting=0D=0A
SUMMARY:Meeting
PRIORITY:3
END:VEVENT
END:VCALENDAR"

You should put this text into a variable before using the text to binary. That way with the debug you can see if you are getting what you expected on the text.

Regards,

Marcelo