To retrieve dynamic marketing list member in Dynamics CRM 2011 follow below steps:
- Pass list Guid as string and it will return dynamic marketing list member
private EntityCollection RetrieveDynamicMemberList(IOrganizationService service, string strList) { ColumnSet cols = new ColumnSet(new string[] { "query" }); // GUID of the Dynamic Marketing List var entity = service.Retrieve("list", new Guid(strList), cols); var dynamicQuery = entity.Attributes["query"].ToString(); EntityCollection dynamicmemberec = service.RetrieveMultiple(new FetchExpression(dynamicQuery)); return dynamicmemberec; }