Tag Archives: code
Find User with least number of Tasks due on a Date
In this scenario, we need to find a user in a team with the least number of Tasks assigned to them on a particular date so that we can assign a newly created Task record to them. This example can … Continue reading
Filed under Uncategorized
Self Referential Many to Many Relationship
I created a Many to Many relationship to and from the User entity- nothing out of the ordinary. I then tried to programmatically retrieve the records associated to this relationship (ie, to the intersect table). I specified the following intersect … Continue reading
Filed under Uncategorized
Using JavaScript to assign a record
A while back, a user on the Microsoft Dynamics forums asked how to assign a record using JavaScript. Here’s the code, remember to update the userid and recordid variables. var header = GenerateAuthenticationHeader(); var userid = "838975f4-029c-de11-9693-0003ffc4c746"; var recordid = … Continue reading
Filed under Uncategorized
SetStateDynamicEntity on Incident Entity
I wrote a plug-in that needs to perform some validation when a user tries to close an Incident record in CRM and verify whether it can be closed or not. I registered it against the SetStateDynamicEntity, however it didn’t trigger. … Continue reading
Filed under Uncategorized
Querying a PartyList field
CRM doesn’t allow a PartyList field to be queried using a QueryExpression (it doesn’t allow it using Advanced Find either). A colleague had tried to query the Campaign Response records to ascertain whether a Contact had responded to a Campaign … Continue reading
Filed under Uncategorized