Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

single code string(people's partry) value is giving syntax error while executing the JS

Posted on by 15


On change of Legal Name I'm triggering the JS.
one scenario it is getting failed. i.e if I entered the single code(people's party) inside the string, JS throwing the below error. 

what is the resolution for this issue?
pastedimage1680065719389v4.png

pastedimage1680065305655v2.png

Thank you !!

  • Banne.5b3 Profile Picture
    Banne.5b3 15 on at
    RE: single code string(people's partry) value is giving syntax error while executing the JS

    Noted Guide Preite. Thank you!

    Can you please provide sample code for this scenario?

  • Suggested answer
    Guido Preite Profile Picture
    Guido Preite 54,081 Super User 2024 Season 1 on at
    RE: single code string(people's partry) value is giving syntax error while executing the JS

    looks like some custom javascript is called when you update the field, calling the Web API (or OData 2.0)

    Inside Web API the single quotation mark is used for the condition (the eq '' part in the error) so the script needs to be updated to handle if single quotation marks are inside the field value.

    You need to contact who created the script or another developer to fix this problem.

    hope it helps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans