locked
Lead entity - Create Sms Campaign Activity RRS feed

  • Question

  • 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

    Monday, September 30, 2013 4:34 PM

Answers

  • Hello all.

    Problem is solved. So, I want to clarify things we discovered.

    There is a field in Lead entity called donotpostalmail with the follwing description "Information about whether to allow sending postal mail to the lead." This field has 2 values(Allow/Do not Allow)

    The interesting part is this donotpostalmail field controls SMS sending condition. If the field value is "Allow" then a SMS campaign activity can be sent to this Lead record. But if "Do not Allow" no relation is stored in Letter table in DB.

    In addition, I renamed the label of this field for users.

    That's all.

    • Marked as answer by cankabaklarli Wednesday, October 2, 2013 8:15 AM
    Wednesday, October 2, 2013 8:15 AM