This is a migrated thread and some comments may be shown as answers.

is there a way to create an iCalendar export on appointment creation

2 Answers 30 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
White Horse Development
Top achievements
Rank 1
White Horse Development asked on 06 Aug 2010, 06:28 PM


I am able to create the iCalendar export without problem when the user clicks the "export" button, but we have a requirement from the client to send an email (with .ics attachment) when an appointment is created.  Open to any ideas.

thanks!

2 Answers, 1 is accepted

Sort by
0
White Horse Development
Top achievements
Rank 1
answered on 06 Aug 2010, 07:21 PM

some more information:
1) I have everything setup like the sample code for iCalendar export.
2) I have hidden the "export button" in the appointments template (idea is to programatically "click" the button once the appointment has been added to the schedule)
3) WHENEVER I insert or edit an appointment this event (RadScheduler1_AppointmentCommand) is firing by itself (i.e. no clicking on the button via the user interface or javascript).
4) the appointment object that is available in the event handler e.Container.Appointment does not contain any attribute information, even though I have four custom attributes that i need to access.

any help would be appreciated. 
thanks!
0
Peter
Telerik team
answered on 11 Aug 2010, 01:55 PM
Hello,

You should handle AppointmentInsert and AppointmentUpdate and use the following code in the event handlers
if (e.CommandName == "Export"
    WriteCalendar(RadScheduler.ExportToICalendar(e.ModifiedAppointment)); 
    //e.Appointment for AppointmentInsert

similarly to the code used in the iCalendar Export demo.

Custom attributes are not exported, but we have added the description field when exporting appointments. You can easily rename 'Description' to 'MyCustomAttrName' in the advanced form using the localization property: Localization-AdvancedDescription="'MyCustomAttrName'"

Adding a description field is easily accomplished as well.

I hope this offers you an acceptable alternative.

Kind regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
White Horse Development
Top achievements
Rank 1
Answers by
White Horse Development
Top achievements
Rank 1
Peter
Telerik team
Share this question
or