Pages
Home
About Me
Contact Us
Videos
How to convert sObject to String in Apex?
To convert sObject to String in Apex, below is the simple code.
Example:
public Account acct = new Account(Name = 'Test Account');
String objType = String.valueOf(acct);
system.debug('objType is ' + objType);
Output:
Cheers!!!
Newer Post
Older Post
Home