You need to sign in to do that
Don't have an account?

Error:line breaks not allowed in string literals
Hi Team,
When we are using Below SOQL we are facing Erro Like "the line breaks not allowed in string literals"
SOQL:
Public String query = 'SELECT id,name,Opportunity.RecordType.name,
(SELECT Id,Ownerid, ActivityDate FROM OpenActivities Order By LastModifiedDate ASC),(SELECT LastModifiedDate,TeamMemberRole FROM OpportunityTeamMembers WHERE TeamMemberRole = \'Team\'') From Opportunity where id = 'OptyID';
How to remove the litterals from above query.Please Help us
Thanks
When we are using Below SOQL we are facing Erro Like "the line breaks not allowed in string literals"
SOQL:
Public String query = 'SELECT id,name,Opportunity.RecordType.name,
(SELECT Id,Ownerid, ActivityDate FROM OpenActivities Order By LastModifiedDate ASC),(SELECT LastModifiedDate,TeamMemberRole FROM OpportunityTeamMembers WHERE TeamMemberRole = \'Team\'') From Opportunity where id = 'OptyID';
How to remove the litterals from above query.Please Help us
Thanks
Please try below code :
Let me know if still receive the same error.
Thanks,
Vishal
Thanks for your help.Query is working fine but When we are excuting in Anonymous class we are getting error like "Loop variable must be an SObject or list of Opportunity".
Can you please help me on this issue.
Thanks