Method Community

 

Updating RecurrenceInfo for recurring Activity

Last post 07-13-2009 5:33 PM by Anonymous. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-06-2009 7:45 PM

    • Matt
    • Top 10 Contributor
    • Joined on 11-04-2008
    • Posts 877

    Updating RecurrenceInfo for recurring Activity

    I am trying to add and activity (all thru the API) and then update that activity with the RecurrenceInfo.

    When I use the following to update the RecurrenceInfo field:

    <MI CE='WEEKLY'    ><Record><AppointmentID>1638</AppointmentID><StartTime></StartTime><EndTime></EndTime><RecurrenceStart>2009-01-01</RecurrenceStart><RecurrenceEnd></RecurrenceEnd><EndAfter>999</EndAfter><IsToBeRenewed>off</IsToBeRenewed><CalendarID>1824397440</CalendatID><DeleteExistingOccurrenceOnInsert>false</DeleteExistingOccurrenceOnInsert><WeeklyNumber>1</WeeklyNumber><WeeklySun>true</WeeklySun><WeeklyMon>true</WeeklyMon><WeeklyTue>true</WeeklyTue><WeeklyWed>true</WeeklyWed><WeeklyThu>true</WeeklyThu><WeeklyFri>true</WeelyFri><WeeklySat>true</WeeklySat></Record></MI>

    buit works fine without the italicized part, but once I add the italicized part, I get an error that say the following when I click the 'Edit / View Recurring Dates' button on the Add/Edit Work Order screen.

    "The basis this service was created from is not available on this page.

    Have the administrator edit this page and edit the Recurring-Object to allow for the basis.

    Appointments already creatd will not be affected unless Insert Recurring Dates is clicked and 'Delete existing occurrences on insert' is checked."

    Do I have something wrong or am I missing something?

    Where is CalendarID supposed to come from?

    is the CurrentValuesOnScreen part necessary when making an update through the API?

     

    Thanks, Matt


    Matt Raiser

    Founder,



    www.techinthefield.com

    matt@techinthefield.com

    219-221-9500



    ~ Method user / partner since 2008

    ~ Over 15 years field service experience

    ~ 2013 Method Partner of the Year

    ~ Degree in Computer Science





    Creator of:


        


  • 07-08-2009 7:08 AM In reply to

    Re: Updating RecurrenceInfo for recurring Activity

     Matt,

    I can't see the italicized part, can you copy and paste it again. The message appears when the Calendar-Recurrence object does not contain the basis (in this case Weekly).

    However unless you changed the screen and removed the Weekly option from the basis, you shouldn't be getting this message.

    Peter

  • 07-08-2009 8:10 AM In reply to

    • Matt
    • Top 10 Contributor
    • Joined on 11-04-2008
    • Posts 877

    Re: Updating RecurrenceInfo for recurring Activity

     Peter,

    This is the italicized part:

    <WeeklyNumber>1</WeeklyNumber><WeeklySun>true</WeeklySun><WeeklyMon>true</WeeklyMon>

    <WeeklyTue>true</WeeklyTue><WeeklyWed>true</WeeklyWed><WeeklyThu>true</WeeklyThu>

    <WeeklyFri>true</WeelyFri><WeeklySat>true</WeeklySat>


    Matt Raiser

    Founder,



    www.techinthefield.com

    matt@techinthefield.com

    219-221-9500



    ~ Method user / partner since 2008

    ~ Over 15 years field service experience

    ~ 2013 Method Partner of the Year

    ~ Degree in Computer Science





    Creator of:


        


  • 07-09-2009 7:32 PM In reply to

    Re: Updating RecurrenceInfo for recurring Activity

     Matt,

    <WeeklyFri>true</WeelyFri> has differnt tag names. Your missing the k in WeelyFri.

    This breaks the xml and that is why you get the message as it can't read the CE attribute for 'Weekly'.

    This will fix the issue. I'd recommend filling in the StartTime, EndTime and RecurrenceEnd time.

  • 07-13-2009 4:30 PM In reply to

    • Matt
    • Top 10 Contributor
    • Joined on 11-04-2008
    • Posts 877

    Re: Updating RecurrenceInfo for recurring Activity

    Peter,

    Thanks for catching that.

    I no longer get the error, however the day check boxes still do not show up properly. (Only the Monday checkbox is ever checked. Here is the XML I insterted (I'll put it on multiple lines this time sop you can see it all):

    <MI CE='WEEKLY'    ><Record><AppointmentID>3121</AppointmentID><StartTime></StartTime>

    <EndTime></EndTime><RecurrenceStart>2009-01-01</RecurrenceStart><RecurrenceEnd></RecurrenceEnd>

    <EndAfter>999</EndAfter><IsToBeRenewed>off</IsToBeRenewed>

    <DeleteExistingOccurrenceOnInsert>false</DeleteExistingOccurrenceOnInsert><WeeklyNumber>1</WeeklyNumber>

    <WeeklySun>false</WeeklySun><WeeklyMon>false</WeeklyMon><WeeklyTue>false</WeeklyTue>

    <WeeklyWed>false</WeeklyWed><WeeklyThu>true</WeeklyThu><WeeklyFri>false</WeeklyFri>

    <WeeklySat>false</WeeklySat></Record></MI>

     

    The only things (that I can see) that are missing are the CalendarID and CurrentValuesOnScreen. Are those 2 fields required? Or is there something else that would prevent the screen from not picking up the correct days of the week?


    Matt Raiser

    Founder,



    www.techinthefield.com

    matt@techinthefield.com

    219-221-9500



    ~ Method user / partner since 2008

    ~ Over 15 years field service experience

    ~ 2013 Method Partner of the Year

    ~ Degree in Computer Science





    Creator of:


        


  • 07-13-2009 5:33 PM In reply to

    Re: Updating RecurrenceInfo for recurring Activity

     Matt,

    Can you enter a value for StartTime, EndTime and RecurrenceEnd. The missing values is causing an issue with the processing of the xml.

    If these values are not required and you prefer not to set them, then let me know and I'll see what I can do.

    Peter

Page 1 of 1 (6 items)