0

Abc's Place this coming in apex. actual picklist value is => Abc's Place,

Abc's Place is coming from json from Vf page to Javascript Remoting.

It's throwing an error when I am passing to field, says that Restricted field value. how to convert ' to '?

I have used String.valueOf and escapeUnicode, but no luck.

7

' is escaped HTML Entity, just like (, &, and so on. To unescape most of them in Apex use String.unescapeHtml4() method which

Unescapes the characters in a String using HTML 4.0 entities.

For instance:

String unescapedString = 'Abc's Place & Xyz's Place'.unescapeHtml4();
// "Abc's Place & Xyz's Place"
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.