Skip to main content
David Kemp a posé une question dans #Sales And Marketing
I feel like there should be a way to get an object from its Id but haven't been able to find any reference to it other than by using a SOQL query.

 

Or is that just wishful thinking?

 

Thanks,

 

David
9 réponses
  1. 27 sept. 2013, 12:30
    David this is possible...especially if you don't need data from the object and just want to perform an update..so for example on an account if I know the Id and I know I want to update the Type field...regardless of what the current value is:

     

    Account a = new Account(Id='xxxxxxxxxxxxxxx');

     

    a.Type = 'Client';

     

    update a;
0/9000