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
David SilvaDavid Silva 

Common fields in all objects

Hi,

I have to delete records of all object (generic) in salesforce based on certain criteria.
I have to know the commom field in all the objects(Account,Contacts,lead etc and the Custom object)
 
Best Answer chosen by David Silva
Amit Chaudhary 8Amit Chaudhary 8
Every object have some unique set of fields. Some audit field are same of each object. Please check below post for more information
1) https://help.salesforce.com/apex/HTViewSolution?urlname=Enabling-Create-Audit-Fields&language=en_US

Audit field on salesforce
CreatedByID
CreatedDate
LastModifiedbyID
Last ModifiedDate

Additionally, fields from the Lead object related to conversion can also be defined on insert:
ConvertedDate
ConvertedAccountId
ConvertedContactId
ConvertedOpportunityId
1) https://help.salesforce.com/HTViewSolution?id=000176484&language=en_US

Let us know if this will help you

Thanks
Amit Chaudhary

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Every object have some unique set of fields. Some audit field are same of each object. Please check below post for more information
1) https://help.salesforce.com/apex/HTViewSolution?urlname=Enabling-Create-Audit-Fields&language=en_US

Audit field on salesforce
CreatedByID
CreatedDate
LastModifiedbyID
Last ModifiedDate

Additionally, fields from the Lead object related to conversion can also be defined on insert:
ConvertedDate
ConvertedAccountId
ConvertedContactId
ConvertedOpportunityId
1) https://help.salesforce.com/HTViewSolution?id=000176484&language=en_US

Let us know if this will help you

Thanks
Amit Chaudhary
This was selected as the best answer
David SilvaDavid Silva
Hi Amit,

Thanks for the reply.
I would like to know about the custom setting and is it possible to include the commom fields in all objects in the custom setting?
Is it possible to access the custom setting from the batch apex?

With Regards,
       David