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
Surendra nuneSurendra nune 

Prevent un necessary updates


How do we prevent un-necessary updates on a record?

For example, a User(say A) is owner and creator of a record. There is a visualforce page which updates this record. Can we prevent the Lastmodifieddate from being updated even though there aren't any changes to the record?

Please don't say that you have to query the record, compare the changes and then update the record.


DeepthiDeepthi (Salesforce Developers) 
Hi Surendra,

Can you please elaborate your question?

As you are referring, you have a field in your Visualforce page and if any value is updated from the page it will hit the model and thereby the LastModifiedDate changes. Would you require this has to be prevented?

Best Regards,