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
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.
Derek,
Thanks for the reply.The AppointmentAdd.aspx/ascx could easily add a dropdownlist of Resources so the user could create or modify an appointment along with the "Resource". It would seem logical that this would be what a user would want to do without having to get a developer to make code changes.
Sometimes everyone thinks only in the terms of writing code. Since the AppointmentAdd.ascx lets a user do everything else, Add Appointment, Delete Appointment, Recurrence, why not allow them to change the "Resource" also?thanks again,mikez
I will be suggesting several new features. Thanks for the link....
It could certainly be a good improvement, Mike.
Presently, the WebSchedule does not support having Multiple Resources per appointment as a feature, so the only resource an appointment knows is its owner. Some have observed that the data model can support associating multiple resources with an activity, the ActivityResources table was designed with this kind of extensibility in mind by the WebSchedule Dev Team. But as you probably know in software development, a line has to be drawn somewhere as far as how many features can get included while still shipping on time.
You can suggest this as a feature:http://devcenter.infragistics.com/Protected/RequestFeature.aspx
If you want a look at an example of handling multiple resources outside of the schedule views in the WebSchedule, then there is a Resource Administration sample.