Activity › Forums › Salesforce® Discussions › How do I convert an object to a string in Salesforce? Salesforce® Discussions How do I convert an object to a string in Salesforce? Posted by Ratnesh on July 9, 2020 at 6:43 AM How do I convert an object to a string in Salesforce? Anjali replied 5 years, 10 months ago 2 Members · 1 Reply 1 Reply Anjali Member July 9, 2020 at 11:51 AM To convert sObject to String in Apex, below is the simple code. Example: public Account acct = new Account(Name = ‘Test Account’); String objType = String. Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me