Community
Showing results for 
Search instead for 
Do you mean 
Reply

Recurring Exceptions: How does one change the RecurEndDate on an existing recurrence

Astute Commentator
Posts: 168
Country: United States

Recurring Exceptions: How does one change the RecurEndDate on an existing recurrence

How does one change the RecurEndDate on an existing recurrence.

 

Any idea how this is done. I retrieve the recurrence and change the date but it never gets saved.

 

Also, anybody from Swiftpage answering questions on this forum? I've posted a question last week and nothing.

 

T

Copper Super Contributor
Posts: 86
Country: United_Kingdom

Re: Recurring Exceptions: How does one change the RecurEndDate on an existing recurrence


Thatch2 wrote:

How does one change the RecurEndDate on an existing recurrence.

 

Any idea how this is done. I retrieve the recurrence and change the date but it never gets saved.

 

Also, anybody from Swiftpage answering questions on this forum? I've posted a question last week and nothing.

 

T


 

Hi Thatch2,

 

Sorry to hear that you're feeling ignored. While we do our best do check the forum frequently and respond to any unanswered threads we cannot guarantee a response from a Swiftpage employee. The primary focus of the community forum is to receive support from your peers.

If you have a more pressing query it's best to send it to act.developers@swiftpage.com as we aim to respond within 48 hours of receipt.

 

How are you trying to edit the end date? You can't do it directly as the property is read-only.

If I remember correctly you have to create a new ActivityRecurSpec with the properties you want then assign it to your activity before calling Update(). You may even be able to do something like MyActivity.RecurSpec.EndDate = MyDateTime but I haven't tested this.

 

If you could provide a little more context on exactly what you're doing then I'd be happy to test this for you.

 

Kindest regards,

 

Sam.

____________________________________________________________

Unfortunately I no longer work for Swiftpage International. Please do not send any queries to this account.
Astute Commentator
Posts: 168
Country: United States

Re: Recurring Exceptions: How does one change the RecurEndDate on an existing recurrence

Sam,

 

Thanx for your answer.

 

I tried MyActivity.RecurSpec.EndDate = MyDateTime and that does not work. It shows that the date is set and after the update, if you retrieve the recurring activity, the old date is still there. I have also tried

   MyActivityList.item(0).RecurSpec.EndDate = MyDateTime

 

and that does not work either.

 

Quite simple. How can I update the EndDate of a recurrence specification?

 

Also, I would prefer to set the EndDate from the retrieved Activity list so that I do not have to instantiate the activity i.e.

 

              MyActivityList.item(0).RecurSpec.EndDate = MyDateTime

             MyActivityList.item(0).update()

 

 

 

Thanx.

 

T

Copper Super Contributor
Posts: 86
Country: United_Kingdom

Re: Recurring Exceptions: How does one change the RecurEndDate on an existing recurrence

Hmm, it seems like you've already tried the ways that I can remember.

Admittedly it's been a while since I've looked into recurring activities. Let me go and set up a test scenario and see what results I get.

It's quite possible that you're doing everything right and something else is wrong like a bug or database issue so let me confirm this for you.

____________________________________________________________

Unfortunately I no longer work for Swiftpage International. Please do not send any queries to this account.
Copper Super Contributor
Posts: 86
Country: United_Kingdom

Re: Recurring Exceptions: How does one change the RecurEndDate on an existing recurrence

Hi Thatch2,

 

I'm afraid that the mystery deepens.

I've tried both of these methods and for me they worked absolutely fine.

 

Method 1 - Instantiated activity

MyActivity.RecurSpec.EndDate = MyActivity.RecurSpec.EndDate.AddDays(7);
MyActivity.Update();  

 (I also set it to a DateTime as well)

 

Method 2 - Activity List

MyActivityList[0].RecurSpec.EndDate = MyActivityList[0].RecurSpec.EndDate.AddDays(7);
MyActivityList[0].Update();

(Obviously I did some checking to make sure that this list item was valid)

 

Once I've called either of these methods I open the activity and can see the end date has changed.

If I request a list of activities with FirstInstanceRestriction.None I can now see all the extra recurring activities.

 

To try and give you a little more context as to my setup:

 

I'm using Act! Web v17.1

My project references the 15.1 DLL's currently. I can test another set if you like, although I suspect they haven't changed.

The activity I target is always the first occurence of a recurring series.

 

I hope this helps.

If you want me to test any other scenarios then let me know.

 

Kindest regards,

 

Sam.

____________________________________________________________

Unfortunately I no longer work for Swiftpage International. Please do not send any queries to this account.
Astute Commentator
Posts: 168
Country: United States

Re: Recurring Exceptions: How does one change the RecurEndDate on an existing recurrence

Thank you for your quick response.

 

I tried this on Act! 17.1 library and that did not work. However, I tried on Act! 17 and it works! Go figure....

 

T

 

Copper Super Contributor
Posts: 86
Country: United_Kingdom

Re: Recurring Exceptions: How does one change the RecurEndDate on an existing recurrence


Thatch2 wrote:

Thank you for your quick response.

 

I tried this on Act! 17.1 library and that did not work. However, I tried on Act! 17 and it works! Go figure....

 

T

 


Thanks for letting me know.

 

I'll test this on the 17.1 library and see if there's something wrong, and if so, I'll escalate it for repair.

____________________________________________________________

Unfortunately I no longer work for Swiftpage International. Please do not send any queries to this account.
Copper Super Contributor
Posts: 478
Country: Australia

Re: Recurring Exceptions: How does one change the RecurEndDate on an existing recurrence

BTW i am interested in working out how to set the recurring variables on a new activity i am creating, if anything comes of this or you know of some documentation can you please share

Jason Dawson Financial Planning
Brisbane | Australia - JDFP Home Page

Act Ver - Act! Premium Version 17.1.169.0, Hot Fix 3
OS - Windows 7 (stand alone machine)
MS Office - Enterprise 2007
Phone - Samsung Galaxy s6
Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Recurring Exceptions: How does one change the RecurEndDate on an existing recurrence

I use the activity recurr spec class

 

Here are tow examples: Once and Weekly

 

 

Dim NewRecurSpec As New Act.Framework.Activities.ActivityRecurSpec

 

' ONCE

NewRecurSpec.Period = Act.Framework.Activities.ActivityRecurPeriod.None

NewRecurSpec.DayType = Act.Framework.Activities.ActivityRecurDayType.None
NewRecurSpec.Day = New Act.Framework.Activities.ActivityRecurDay(Act.Framework.Activities.ActivityRecurTypedDay.None)
NewRecurSpec.EndDate = Me.Activity.RecurSpec.EndDate
NewRecurSpec.Frequency = 0
NewRecurSpec.IsEndless = True
NewRecurSpec.Modifier = Act.Framework.Activities.ActivityRecurModifier.None
NewRecurSpec.Month = 0
NewRecurSpec.Period = Act.Framework.Activities.ActivityRecurPeriod.None

 

' Weekly

NewRecurSpec.Period = Act.Framework.Activities.ActivityRecurPeriod.Weekly
NewRecurSpec.DayType = Act.Framework.Activities.ActivityRecurDayType.Typed

' Every x weeks
NewRecurSpec.Frequency = Me.numWeeklyInterval.Value

NewRecurSpec.Day = New Act.Framework.Activities.ActivityRecurDay( _
IIf(Me.chkMonday.Checked = True, ScheduleDayOfWeek.Monday, 0) + _
IIf(Me.chkTuesday.Checked = True, ScheduleDayOfWeek.Tuesday, 0) + _
IIf(Me.chkWednesday.Checked = True, ScheduleDayOfWeek.Wednesday, 0) + _
IIf(Me.chkThursday.Checked = True, ScheduleDayOfWeek.Thursday, 0) + _
IIf(Me.chkFriday.Checked = True, ScheduleDayOfWeek.Friday, 0) + _
IIf(Me.chkSaturday.Checked = True, ScheduleDayOfWeek.Saturday, 0) + _
IIf(Me.chkSunday.Checked = True, ScheduleDayOfWeek.Sunday, 0) _
, False)

If Me.rdbNoEndDate.Checked = True Then
' NO END DATE
NewRecurSpec.EndDate = Me.Activity.RecurSpec.EndDate
NewRecurSpec.IsEndless = True
Else
' END DATE SELECTED
NewRecurSpec.EndDate = Me.jccRecurrenceEndDate.Value
NewRecurSpec.IsEndless = False
End If

NewRecurSpec.Modifier = Act.Framework.Activities.ActivityRecurModifier.None
NewRecurSpec.Month = 0

 

-- Jim Durkin