locked
How to use multiple joint attributes as CRM entity primary key? RRS feed

  • Question

  • It also looks like, the name for a entity can be duplicated, it seems not the primary key/attribute for the entity.

    I'd like to add a custom entity with three attribute as the primary key. For example, the entity will have att1, att2 and att3 as the attributes. I'd like to use all of them as the primary key. If all three of the attributes are the same, then the record are duplicate and shouldn't be saved to the database.

    Does CRM 2011 have a built-in feature for that?

    Thanks,

    Bei

    Wednesday, October 2, 2013 6:34 PM

Answers

  • You would have to implement your own code to handle this (likely via a plugin) to handle. Records in CRM only have a single primary key which is a uniqueidentifier field.

    On a slightly easier approach you could use Duplicate Detection to put rules in place to prompt users the record is a potential duplicate, but there isn't a mechanism OOB to actually prevent a save. 


    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Wednesday, October 2, 2013 6:53 PM
    Moderator