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
anillllanillll 

How to update a value using a trigger

when we create a new record a field should be updated with the previous record value

Bhawani SharmaBhawani Sharma
I am not sure if I understand your question correctly, still trying my best to answer
You can set data in field like
trigger TriggerName on Account(before insert) {
for(Account acc : Trigger.New) {
acc.Name = 'Test';
}
}