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
ashish jadhav 9ashish jadhav 9 

When I create x__c object another x__history object is automatically created? what is the use of this object? when we're using this object?

Why there is two object get created when I create any cutom object? What is the exact use of history object? when we're using this object? What are some things that we must remember while using this object? Please guide.
Best Answer chosen by ashish jadhav 9
Abhishek_DEOAbhishek_DEO
Your real object x__c contains your business data entered by user.This data is mmeaningful to your business. Histroy table do not record user data but changes made to data. For eg. Who change the data in a filed , what was the previos value etc..It just track history of record changes which you might need in future.

 

All Answers

Abhishek_DEOAbhishek_DEO
Your real object x__c contains your business data entered by user.This data is mmeaningful to your business. Histroy table do not record user data but changes made to data. For eg. Who change the data in a filed , what was the previos value etc..It just track history of record changes which you might need in future.

 
This was selected as the best answer
NagendraNagendra (Salesforce Developers) 
Hi Ashish,

Your custom object x__c will have all the real time and useful data pertaining to your business.It will store the information of any specific type.But history object is comparatively different.History object that tracks changes to an object record. You can use SOQL relationship queries to traverse a history object to its parent object.

Kindly mark it as solved if it helps.

Best Regards,
Nagendra.P