function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Prakash Badugu 8Prakash Badugu 8 

Primary key of force.com database table/object

Hello Everyone,

I have a small crazy doubt. I really appriciate that salesforce starts with a data model and end up with user interface. But i beliver that an object in a salesforce would create a database table in sales force environment/org. Being focused on CRM and being a salesforce user, we would be dealing with dirty data. You got it, i am trying to say that what are the primary key constraints of salesforces' databse. It creates its'  own primary key. Because the business is generic so there would be chances that the primary key of salesforce would be having a duplicacy of accounts, leads, contacts. How we will justify that a record as and entity of accounts. leads.. contacts is not duplicated in salesforce database. Are we ruling out  the other constraints simply depending on the force.coms primary ke
y.

Please suggest !!

regards,
Bujji/
RishavRishav
There are one option as checkbox while creating the field  like this  :     "Unique -Do not allow duplicate values  " so make a field as unique and use it as a primary key or there is an auto number field that is also unique by default so you can also use that one as a primary key .