You need to sign in to do that
Don't have an account?

Get Record without SOQL using sObject
After I insert a record I would like to have access to the value of an AutoNumber field.
I see to recall a way to load / get a record based on an sObject but cannot locate it (Or I am crazy).
I would like to not have to do an SOQL statement if at all possible. One would think there would be a way to do it. All attemps to reference the field after inserting the sObject return null since it was not part of the sObject statement I inserted and since I cannot set the value, I cannot add the field in the statement.
then you can show all record without query
Thanks, but not speaking of a Visualforce controller or extension
No. There is no way except to use SOQL.
If you find a way out, please let me know (that way you can prove your are not crazy!).
This is one of the beefs that I have with Apex. After I insert a record through an sobject, I would like to have SF set at least autonumbers, formula fields and other fields such as name on a Contact ( a concat of first and last names).
Thanks,
Venkat