+ Start a Discussion
srinivas pulipatisrinivas pulipati 

Hi i have one doubt that is i wrote one trigger before add account name 'MR' that program execute successfully but unfortunately i delete the trigger after execution.But this time i am remove 'MR' before name what can i do please tell me the answer?

1 month before i wrote the trigger ,i am also search the recyclbin also but it is not there.


Thanks 
Srinivas
SRKSRK

So this time you need a trigger which search for MR in the account name and if it exisit remove the MR  ????

 

if that the case you can try this

trigger removeMR(before insert, before update)
{
    for(integer i=0;i<trigger.new.size();i++)
    {
                    trigger.new[i].name.remove('MR');
    }
}