Hello!
I'm organizing forms, views and fields in MS
CRM 2011 (UR5, Windows Server 2008 R2) for
a Marina Company. And have a question about it.
I use 3 main entities for records(contact, account, lead). To create and distribute
Email and SMS campaigns with using these records, I wrote a custom plug-in.
I use almost same
create, distribute, send, retrieve, query(*) methods for all entity types. I just change some field, table names as you imagine. Everything
is quite great and working on. What I am stucked with is;
- I can
cdsrq(*) Email
campaigns for contact, account and lead.
- I can
cdsrq(*) SMS
campaigns for contact and account, but not for lead.
I don't know why, but what I noticed from my point of view; when I create a SMS campaign for a marketing list from
Lead entities, something goes wrong and no relation is recorded in Letter table located in CRM DB.
I wonder if there is sth special that I should re-consider. Why there is no record in Letter Set for Leads?
If I solve this issue, I can easily select Marketing List with the code below;
List<Microsoft.Xrm.Sdk.Entity> MemberList = (from ld in _context.LeadSet
join party in _context.ActivityPartySet on ld.LeadId.Value equals party.PartyId.Id
join e in _context.LetterSet on party.ActivityId.Id equals e.ActivityId.Value
where e.RegardingObjectId.Id == CampaignActivityId
select ld).ToList<Microsoft.Xrm.Sdk.Entity>();
In addition, When I create an Email
campaign for a marketing list from Leads a record stores in CRM DB and I can select MemberList with the code above with just changing the 3rd line with this;
join e in _context.EmailSet on party.ActivityId.Id equals e.ActivityId.Value
Thanks in advance.
Can