Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
Resources - Add, Delete & Modify to an Activity
posted

I can easily add a resource to a NEW Activity through code.

Is there a way to add a resource when using AppointmentAdd.aspx?

How do I ADD a resource to an existing Activity?

How do I MODIFY a resource from an existing Activity?

How do I DELETE a resource from an existing Activity?


thanks,
mikez

Parents
No Data
Reply
  • 4960
    posted

    There is a one-to-one relationship between an Activity and the Resource which owns it.  Therefore when you think you can easily add a resource to a new Activity, it really is that you can easily create an Activity having a resource (through the Activity's ResourceKey property, no doubt).

    There is no way when using the Add/Edit Appointment dialog UI to attach additional Resources to the Activity.  A newly added Activity will be owned by the WebScheduleInfo's ActiveResource by default.

    You can modify the resource that owns an Activity by changing its ResourceKey to refer to a different resource and updating your underlying data source; the include data provider controls feature an administrative API ( UpdateActivity(Activity) ) that you can call to update an Activity outside normal WebSchedule operations.  If you do update several activities, you should batch them together early in page processing and re-call DataBind( ) on the WebScheduleInfo so that the Activities rendered to the views are the latest and most up-to-date ones.

    An Activity must always have a Resource that owns it.  You can effectively detach the Resource from the Activity by changing it's ResourceKey to that of the Unassigned Resource.

Children