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
VenkateshVenkatesh 

How to select the account name which contains apostrophe in its name.

Hi ,
 
I have ran into an error. where I have successfully quired the account names into look-up field.But  i am unable to select the account name which contain single quotatoin(').

Below is an explanation , 
The Account field has a Lookup filter to select only names. If there is a apostorphe  (example name : Kings's Empire ) in the Account name. I was unable to select it . 
Can anybody plese help to fix it.

 
Best Answer chosen by Venkatesh
VenkateshVenkatesh
Hi Gaurav ,

Sorry for late reply.
I have sloved the above issue by using JSENCODE method.surruned the name varialbe with JSENCONDE as shown below.
syntax: JSENCODE(string)

All Answers

GauravGargGauravGarg

Hi Venkatesh,

I ran in same issue few time back, then I searched and got the solution. Please use below method to resolve your issue too. 

String.escapeSingleQuotes(STR);

Hope this helps !!!

Thanks,

Gaurav
Skype: gaurav62990

VenkateshVenkatesh
Hi Gaurav ,

Sorry for late reply.
I have sloved the above issue by using JSENCODE method.surruned the name varialbe with JSENCONDE as shown below.
syntax: JSENCODE(string)
This was selected as the best answer