Reputation: 36573
I need to create an appointment with multiple recipients in MS Dynamics. Note that I do not actually want to save the appointment...that should only happen once the user clicks save. I just want to display the form with multiple recipients already added.
If I use the URL for the appointment form:
/activities/appointment/edit.aspx
I can specify a partyId url parameter which is the Dynamics GUID for the person I want to add to the recipients....but what if I want to add multiple recipients? Is there a way to do this with URL parameters?
If not, is there a way to programatically add recipients in the form's OnLoad javascript? That is, are there any JavaScript API hooks for this?
Thanks.
Upvotes: 1
Views: 385
Reputation: 4085
No, you won't be able to set more than one party using CRM's partyid/partyidname query string parameters.
Yes, there are onload hooks. Lookup scripting reference. In the second example you'll see how they set a lookup in script.
// Add the object to the array.
lookupData[0] = lookupItem;
You'd just have multiple of these for each of your recipients/resources.
// Add the object to the array.
lookupData[0] = lookupItem;
lookupData[1] = lookupItem2;
lookupData[2] = lookupItem3;
Then its just a matter of how you pass the data to the appointment edit form. You can't add random query string parameters (CRM validates all query string parameters are in a set of known parameters). So you have to do something else to send the data. A couple options...
Hope it helps...
Upvotes: 2