You need to sign in to do that
Don't have an account?
![Medhanie Habte Medhanie Habte](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Unexpected token error with apostrophes in lookup/create page
Greetings, I've developed a lookup page for a Salesforce app we're building. The lookup page, which locates contacts and accounts is based on Jeff Doglas's roll your Salesforce "LookUp" Popup window (http://blog.jeffdouglas.com/2011/08/12/roll-your-own-salesforce-lookup-popup-window/). However, every time I input or search for a record with an apostrophe " ' " in it. I return a unexpected error. Are they any suggestions you can provide for enabling the inclusion of apostrophes in the code. Hope it helps.
Maybe u using dynamic query, see example below if searchString contains info with ', you query look as
And error in ' in LIKE statement.
You can create variable and use it in query.
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks,
Alex