Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
queryStr+ = 'AND Sales_Order__r.sales_year__c =' +\'' +:strYear+\'';
This is my string.strYear is the year value which i want to add dynamicaly.
I am getting an error "Compile Error: unexpected token: '=' "
"Compile Error: unexpected token: '=' "
Can someone help please
queryStr+ = 'AND Sales_Order__r.sales_year__c =\''+Name+'\''
You should change your code to:
queryStr += 'AND Sales_Order__r.sales_year__c = :strYear ';
I think you had a space between + and =
Required, but never shown