How to Flip Sender and Recipient in a Phone Call Record
There is an annoying tendency in Microsoft Dynamics CRM 2011 for the system to set the Recipient of a Phone Call incorrectly. For example, when adding a Phone Call to a Case, it assumes the Recipient is the Account of the Case it is tied to and marks the call as Incoming. It doesn’t make sense that an Incoming call would be directed to an Account. Rather, it should be a User. The business rule I needed to implement was: if the call is Incoming, the Recipient must be a User and conversely, if the call was Outgoing, the Sender must be a User. Here is some scripting you can implement – based on Rajeev Pentyala’s blog based here: http://rajeevpentyala.wordpress.com/2012/04/02/get-and-set-partylist-fields-using-jscript/ It’s tricky to work this out since there are Activity Parties / Party Lists involved. Note here that I have some utility functions that contain some Xrm.Page functions. This will make it easier to update encase there is another change in Microsoft’s syntax such as the ...