Activity Forums Salesforce® Discussions Is it necessary to define an explicit primary key in custom objects?

  • madhulika shah

    Member
    September 7, 2018 at 11:44 am

    Hi Anjali,

    No. Every object has a standard field called id. There is no need to define an explicit primary key in custom objects. The standard id field can be used as primary key.

    Thanks.

  • Avnish Yadav

    Member
    September 7, 2018 at 12:25 pm

    Hello,

    No, it is not necessary, salesforce create a standard field named as Id.

    Thanks.

  • Parul

    Member
    September 21, 2018 at 11:54 am

    There is not necessary that every object has a standard field called id. There is no need to define an explicit primary key in custom objects. The standard id field can be used as primary key.

  • shariq

    Member
    September 21, 2018 at 1:16 pm

    Hi Anjali,

    Salesforce provide a standard field id as a unique identifier for a record weather the record is a standard object record or a custom object record.

    Thanks.

Log In to reply.

Popular Salesforce Blogs