Setting RecordType for new records without query

My godness, how many queries would force.com save if all of us knew this?

insert new Task (
Subject = 'Your appointment is at noon',
RecordType = new RecordType (Name = 'SMS')
);

How come has this gone unnoticed? Anyway, better late than never!

Leave a Reply

avatar
  Subscribe  
Notify of