| trigger CaseSetupTrigger on Contact(before insert,before update){ for(Contact c:[select id,name,RecordTypeId,status__c from contact where id in:Trigger.new]) { RecordType rt = [select Id,name from RecordType where Name ='Duplicate1' and SobjectType = 'Contact']; system.debug('record found------------------------'+rt); if(rt.Id!=null) { if(c.status__c=='Prospect') { c.RecordTypeid='012900000003JZcAAM'; System.debug('id...'+c.RecordType.id); } } } } |
Hi all,
Instead of going for a trigger u can use workflow to update the recordtype field
It works
On 3 Nov 2011 20:03, "Prajnith" <praj...@gmail.com> wrote:
Update Statement Missing...!
PrajnithBanglore
On Thu, Nov 3, 2011 at 7:46 PM, Anil Kumar <anilku...@gmail.com> wrote:
>
> Now I changed th...