You need to sign in to do that
Don't have an account?
DaveKemp
How to instantiate an object from it's ID (string) without using a SOQL query
Hi,
Is there a way to retrieve an object given its ID without having to do a SOQL query, I ask because I'm need to reduce the number of SOQL queries in my code that creates Service Contracts, ContractLineItems and Assets when converting them from Opportunities?
Thanks,
David
You can't retrieve an object based on its id, but if you want to update to add some fields or the like, you can specify the id when instantiating the object as follows:
you can then set various values into myObj and when you update it, the vaues will be applied to the record in the database.
Many thanks Bob (I loved that show)
I'll see if this gives me enough to work with
Regards,
David