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

How to perform the Before Update Trigger if the old record then go to update elase create New Record ?


this is condition i have Account object and ObjectName__c if the Record Created on the Account object then Created on the ObjectName__c New Record if the existing Record then only update the Record

ANUTEJANUTEJ (Salesforce Developers) 
Hi Aqleem,

I see that this is a similar question posted in with different wording.

I think you can simply have a method that gets all the new records and in case if the record values are new then insert them if there are other records with the same values return those records to the trigger and modify the values in before insert.

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.