CRMJS: Error when using Filtered Lookups (Records Containing “&” )

When ever passing values to the Optional Parameters to a Lookup Dialogue, Make sure you encode the value you pass through.

If a value contains a “&” then the URL using the value will be cut short ( therefore causing a error on the lookup loading)

you need to use the builtin Javascript function (encodeURIComponent)


var value = encodeURIComponent(“Acme & Co”);

will return the correctly encoded value Acme

& co

, which will pass through any URL string correctly.



Leave a Reply

Your email address will not be published.