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
HARISH S 11HARISH S 11 

Hello could somebody please help me with this trigger

trigger on Lead if the record is old  & before then update the lead title as old lead ,if it is new & before update title as new lead.
RD@SFRD@SF
Hi Harish,

Do you have any time frame for old and new cause for instance.
the new ones are Lead 1 and lead 2

Step 1: Lead 1 created
Step 2: Lead 2 created

if any one updates Lead 1 or 2 the title would get changed to old lead.

Kind regards
RD
 
HARISH S 11HARISH S 11
Hi RD,

Couldn't get you? 

Regards,
Harish Sridhar
HARISH S 11HARISH S 11
If the lead creation date is more than 30 days - old lead
If the lead is created newly - new lead

If(lead_age > 30){
lead_status__c==old lead;
else
lead_status__c==new lead;
}

Also my requirement is like if am creating a new lead today, after 30 days of time lead_status must me automatically changed to old lead. Could you please help me with this?