You need to sign in to do that
Don't have an account?
community
Merge fields Issue
Created a new custom button of type URL and am passing values into it using merge fields.
Everything is fine but when the {!Opportunity.Name} contains "&", the URL breaks!
/setup/ui/recordtypeselect.jsp?ent=01I200000007SWS&retURL=%2F{!Opportunity.Id}&Name=Auto+Number&
save_new_url=%2Fa1l%2Fe%3FCF00N20000002o7Kh%3D{!Opportunity.Name}
%26CF00N20000002o7Kh_lkid%3D{!Opportunity.Id}%26retURL%3D%252F{!Opportunity.Id}&
CF00N20000002oGth={!Opportunity.Account}&CF00N20000002oGth_lkid={!Opportunity.AccountId}
How do I stop the URL break ,if the name contains '&' ?
Help!
Yeah! Just figured it out that
{!URLENCODE(Opportunity.Name)}
is working.
Thanks Steve.
All Answers
Have you tried passing your value using JSENCODE ???
Thanks
Ankit Arora
Blog | Facebook | Blog Page
Hi Ankit, thanks for the reply.
But the JSENCODE didn't work though!
URLENCODE()
Yeah! Just figured it out that
{!URLENCODE(Opportunity.Name)}
is working.
Thanks Steve.
My bad, I have written JSENCODE instead of URLENCODE.
Anyways great that you have the solution.
Thanks
Ankit Arora
Blog | Facebook | Blog Page