locked
Relationship from Contact to Marketing List RRS feed

  • Question

  • Hi,

    i want to create a sql statement that selects all contacts that belong to a certain marketing list.
    But i dont know how these objects are linked, is "listmembers" the correct linktable?

    Thanks in advance,
    Jan
    Wednesday, September 2, 2009 3:02 PM

Answers

  • Hi, Jan.

    You are absolutely wright. Members of marketing lists are stored in ListMember and EntityId - is identifier of entity and EntityType - EntityTypeCode of entity (contact, account or lead).

    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    • Marked as answer by Jan Klode Thursday, September 3, 2009 6:45 AM
    Wednesday, September 2, 2009 3:28 PM
    Moderator

All replies

  • Hi, Jan.

    You are absolutely wright. Members of marketing lists are stored in ListMember and EntityId - is identifier of entity and EntityType - EntityTypeCode of entity (contact, account or lead).

    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    • Marked as answer by Jan Klode Thursday, September 3, 2009 6:45 AM
    Wednesday, September 2, 2009 3:28 PM
    Moderator
  • Thanks! Unfortunately i tried to join contacts on the listmemberid....but now i realized, that entityid is the correct identifier (And guess what - it works ;)  )

    To sum up:

    -listmenberid is the primary key of a listmembe the row
    and
    -entityid is the foreign key to objects contained in the marketing list

    is this correct?

    Thanks for your help
    Jan
    Thursday, September 3, 2009 6:44 AM
  • >>entityid is the foreign key to objects contained in the marketing list

    From side of logic - yes - it contains identifier of record. From side of DB - it is not foreign key because this field references 3 different tables.
    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    Thursday, September 3, 2009 7:23 AM
    Moderator