Friday, 22 March 2013

How to Achieve  the creation  of  activity records for each marketing list member  on Addition of marketing list to campaign in MSCRM  2011 Custom workflow:


1. First we have to create a text field ( to have latest marketing list guid which is associated recently ) which should be hidden on campaign  
2.  Update this field on  association of marketing list to campaign (Additem  plugin Message on campaign entity).
3. Write custom work flow on update of this campaign record hidden field   which will fetch the associated marketing list from campaign record based on  hidden field text (which is recently added marketing list guid) , then list members and create custom record for each.



Retrieving Marketing List members  in MSCRM  Statsic VS Dynamic:

Firstly, let’s identify the main difference between a static and dynamic Marketing List. A static Marketing List allows you to use Lookup or Advanced Find to add or remove members from the list. However, this is a manual process.
A dynamic Marketing List allows you to setup parameters to control which records will be added or removed from a list. For example, you can setup your dynamic Marketing List to include all Contacts who live in Auckland. Whenever a new Contact is created and has their City set to “Auckland”, CRM will automatically add them to the Marketing List.
The next important difference to note is the way in which Marketing List members are stored in the CRM database. Like Dynamics CRM 4.0, information regarding members belonging to a static Marketing List is stored in two tables. These are:
List – This table stores information about the Marketing List itself.
List Member – This is an intersect table which links a Contact, Account, or Lead to a particular Marketing List.
 Retrieving Marketing List Members in CRM 2011
For example, if we have a Contact in a static Marketing List, the intersect table will store the ContactId and the ListId to associate both records together.
Let’s contrast this with a dynamic Marketing List which doesn’t use the List or List Member tables at all. Instead, the Listtable stores a field called Query which stores a FetchXML query string to determine the Marketing List members. Carrying on with the example above, we would have a FetchXML representation of “all Contacts who live in Auckland”. When the Marketing List is opened in CRM and a user clicks on Marketing List Members, CRM will run the FetchXML query at runtime and display the results to the user.
 Retrieving Marketing List Members in CRM 2011

Code to get the execution entity id , name  in MSCRM custom Workflow:


IWorkflowContext contexto = context.GetExtension<IWorkflowContext>();
String entityName = contexto.PrimaryEntityName;
Guid entityId = contexto.PrimaryEntityId;
Activity Feed @ MSCRM:




1) Creating Microsoft CRM 2011 Activity Feed Auto Posts with Workflow

2) Activity Feeds Report

3)   CRM 2011 – Activity Feed Article List



Introduction to activity feeds by Richard Knudson

http://www.dynamicscrmtrickbag.com/2011/11/13/activity_feeds/

Activity feed rules

http://gotchahunter.net/2011/11/activity-feeds-rules-in-dynamics-crm-2011/

Activity feeds

http://gtcrm.wordpress.com/2011/11/16/activity-feeds-in-microsoft-crm-2011/

How to do mentions in activity feeds

http://blogs.msdn.com/b/crm/archive/2011/10/31/how-to-do-mentions-with-activity-feeds.aspx

Sample code for activity feeds

http://msdn.microsoft.com/en-us/library/hh547450.aspx

working with the SDK and activity feeds

http://blogs.msdn.com/b/crm/archive/2011/10/31/working-with-activity-feed-using-microsoft-crm-sdk1.aspx

How to create a post with mentions using a workflow

http://blogs.msdn.com/b/crm/archive/2011/11/07/how-to-create-a-post-with-mentions-using-workflow.aspx

following and unfollowing records in CRM

http://blogs.msdn.com/b/crm/archive/2011/10/27/following-and-unfollowing-records-in-crm.aspx

How to add a record to the wall

http://blogs.msdn.com/b/crm/archive/2011/11/09/how-to-add-a-record-wall-to-a-form.aspx

5) How to Create a Post with Mentions using Workflow?

http://blogs.msdn.com/b/crm/archive/2011/11/07/how-to-create-a-post-with-mentions-using-workflow.aspx

6) Microsoft Dynamic CRM 2011 Activity Feed Part 2 – Working with Activity Feeds - http://www.powerobjects.com/blog/2011/11/07/microsoft-dynamic-crm-2011-activity-feed-part-2-working-with-activity-feeds/

7) Check out the new Activity feeds in Dynamics CRM 2011

http://www.magnetismsolutions.co.nz/blog/bina/11-11-25/Check_out_the_new_Activity_feeds_in_Dynamics_CRM_2011.aspx

8)  Introduction to the Activity Feeds Solution
http://rc.crm.dynamics.com/rc/2011/en-us/on-prem/5.0/start_with_activity_feeds.aspx



9) Microsoft Dynamics CRM 2011 Activity Feeds – Configuring Custom Entities
http://info.profad.com/bid/78820/Microsoft-Dynamics-CRM-2011-Activity-Feeds-Configuring-Custom-Entities

10) Microsoft Dynamics CRM 2011 Activity Feed, Part 1 – Getting Started

http://www.linkedin.com/groups/Microsoft-Dynamics-CRM-2011-Activity-114154.S.83653659?view=&gid=114154&type=member&item=83653659&trk=eml-anet_dig-b_nd-pst_ttle-cn

11) Best Practices for Activity Reporting In Microsoft Dynamics CRM 2011

http://blog.customereffective.com/blog/2011/12/best-practices-for-activity-reporting-in-microsoft-dynamics-crm-2011.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+CustomerEffectiveBlog+%28Customer+Effective+Blog%29

12) Light “spackling” for your Activity Feed walls

http://blog.sonomapartners.com/2011/12/light-spackling-for-your-activity-feed-walls.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+typepad%2Fsonoma+%28Sonoma+Partners+Microsoft+CRM+Blog%29

13)  CRM 2011 Activity Posts via Workflow

http://stevengevers.wordpress.com/2012/03/22/crm-2011-activity-posts-via-workflow/


C# code to execute custom workflow in MSCRM 2011:


ExecuteWorkflowRequest request = new ExecuteWorkflowRequest()
{
    WorkflowId = _workflowId,
    EntityId = _leadId
};
Console.Write("Created ExecuteWorkflow request, ");

// Execute the workflow.
ExecuteWorkflowResponse response =
    (ExecuteWorkflowResponse)_serviceProxy.Execute(request);