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
James L.James L. 

How to break code into multiple lines if it's too long to fit in one line

like 

 

String strSQL = 'select field1, field2, field3, field4, field5, field6 from objecta  ';

 

if the string is too long, and better break into multiple lines.

 

How to write this?

 

James

Jia HuJia Hu
You can try this way,

String query = 'SELECT Id, Name, Ownerid FROM Account ' +
'WHERE ownerid=\'' + u.id + '\'';