Skip to main content
Example : String str = ' SELECT Name,Id FROM Account LIMIT 10';

Now i want to retrieve "Account" from this query for further use.
2 answers
  1. May 21, 2020, 11:02 PM
    hi, you can use the id you get from the query and get the object name:

    String objectName = objectId.getSobjectType().getDescribe().getName();

    if it helps please mark as correct, it may help others
0/9000