You need to sign in to do that
Don't have an account?
dkn
trigger to change record type ....
Hi
I have an standard contact object and related custom object application.When the admission status in the application changes to accepted , status on the contact object also changes to accepted.When this change takes place, I need the record type of the contact record to change as well....How can i do this using trigger....Any suggestions to kick start this would be really appreciated....
thank you
Dkn,
Write a trigger on Application object to modify the record type of contact whenever there is a change to the status.
Hope it helps.
Sales4ce
All Answers
Try the sample code given below :
trigger trg on contact(after insert,before update) {
Contact con = trigger.new[0];
RecordType Rtype = [Select r.SobjectType, r.Id From RecordType r where r.SobjectType ='Contact' and id =:con.id];
// your logic here
Hope this helps.
Dkn,
Write a trigger on Application object to modify the record type of contact whenever there is a change to the status.
Hope it helps.
Sales4ce