function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mustafa TopMustafa Top 

How to get record name that is known its id without the consume from soql governor limit?

String aid = '001c0000002bXcc';

Account a = new Account(id=aid);

System.debug(a.name);

The debug line is empty. How to get record name?

Dhaval PanchalDhaval Panchal

You can not get other fields using this method. You can only assign values to other field and update that record.

Mustafa TopMustafa Top
Is there any way to do this without the consume from limit?
sandeep@Salesforcesandeep@Salesforce

We can not do it