Problem in Adding An Event to Share point calender - InfoPath Dev
in

InfoPath Dev

Problem in Adding An Event to Share point calender

Last post 04-13-2010 07:28 AM by vura_1234. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 04-13-2010 07:28 AM

    Problem in Adding An Event to Share point calender

    hi,

    I want to add an event to share point calender,im using Jscript code to add the event.

    I followed the article posted at http://www.bizsupportonline.net/infopath2007/programmatically-add-item-sharepoint-calendar-infopath.htm.

    Im able to submit the details through code but the event is not getting added to calendar.

    for assistance im giving EventCAML.xml and code i USED.

    <?xml version="1.0" encoding="UTF-8" ?>
    <Batch OnError="Continue">
    <Method ID="1" Cmd="New">
    <Field Name="Title"></Field>
    <Field Name="Begin"></Field>
    <Field Name="End"></Field>
    <Field Name="Description"></Field>
    <Field Name="Location"></Field>
    </Method>
    </Batch>

    var title = XDocument.DOM.selectSingleNode("/my:myFields/my:Meeting/my:MeetingTitle").text;
    var location = XDocument.DOM.selectSingleNode("/my:myFields/my:Meeting/my:Location").text;
    var begin = XDocument.DOM.selectSingleNode("/my:myFields/my:Meeting/my:Begin").text;
    var end = XDocument.DOM.selectSingleNode("/my:myFields/my:Meeting/my:End").text;
    var desc = XDocument.DOM.selectSingleNode("/my:myFields/my:Meeting/my:MeetingDescription").text;


    XDocument.GetDOM("EventCAML").selectSingleNode("/Batch/Method/Field[@Name='Title']").text = title;
    XDocument.GetDOM("EventCAML").selectSingleNode("/Batch/Method/Field[@Name='Begin']").text =begin;
    XDocument.GetDOM("EventCAML").selectSingleNode("/Batch/Method/Field[@Name='End']").text = end;
    XDocument.GetDOM("EventCAML").selectSingleNode("/Batch/Method/Field[@Name='Description']").text = desc;
    XDocument.GetDOM("EventCAML").selectSingleNode("/Batch/Method/Field[@Name='Location']").text = location;

    XDocument.DataAdapters["Calsubmit"].Submit();

     

    please can any one can guide on this.

    Thank you for smart replies

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.