Skip to main content
9 events
when toggle format what by license comment
Sep 19, 2018 at 22:46 vote accept raunakchoraria
Sep 19, 2018 at 20:24 comment added gNerb That's great news, please remember to accept the answer.
Sep 19, 2018 at 19:51 comment added raunakchoraria JavaScript remoting worked for me and its easier to use than calling oncomplete and stuff. Thanks for the answer.
Sep 19, 2018 at 16:31 comment added gNerb There is one more solution, and that is to use JavaScript remoting or the SFDC javascript apis to handle the bulk of the work in JS. I can't help but feel that your issue here is that you're taking advantage of a behavior that probably shouldn't work at all. There's a risk of this getting "fixed" breaking your code.
Sep 19, 2018 at 16:28 comment added raunakchoraria will try it out and let you know.Thnx for ur suggestions.It helped me understand the root cause
Sep 19, 2018 at 16:26 comment added gNerb You could also consider JSON.serialize(data1) to convert it into a properly formatted json string and then pass the json directly to your method by removing the single quotes oncomplete="alert({!data})" but again, that depends on your data.
Sep 19, 2018 at 16:24 comment added gNerb I think it depends on your data, the safest bet would be to remove the characters altogether. You can also consider doing a string.replace(data1, '\'', '"') to replace all single quotes with double quotes if you think that makes sense for your data.
Sep 19, 2018 at 16:21 comment added raunakchoraria In this case how can special characters be handled, as here it can be seen that you have escaped the quote but still it gives error
Sep 19, 2018 at 16:16 history answered gNerb CC BY-SA 4.0