Wednesday 15 May 2013


Update

Update saves up to 200 existing records of a single object type. Existing records are identified
by unique identifier (Id). Listing 5-34 illustrates the usage of the Update statement by
creating a Resource record for Doug and updating it. Refresh the Resources tab in the
native user interface to see the new record.

Listing 5-34 Updating Records
Resource__c doug = new Resource__c(Name = 'Doug Hole');
insert doug;
doug.Hourly_Cost_Rate__c = 100;
doug.Home_Office__c = 'London';
update doug;

No comments:

Post a Comment