how to provide a link in ui page

vspk
Giga Expert

Hi,

I want to attach a link in a catalog item. and i want to add it through ui pages. the link is:

https://dev13396.service-now.com/com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=483d86c...

when I   am adding it in ui page, it is showing the error: The reference to entity "sysparm_id" must end with the ';' delimiter.

how to solve it . is there any other procedure ?

1 ACCEPTED SOLUTION

srinivasthelu
Tera Guru

Hi Sneha,



These lines are from wiki.   & needs to be replaced with '${AMP}' in your code i guess.



Ampersands in Jelly can cause you grief because Jelly is XML. Use ${AMP} to insert an ampersand in Jelly. If you are writing JavaScript that appears in the HTML part of say a UI page or UI macro that is actually going to run on the browser you are better off putting this code in the "client script" field and that way you can avoid escaping issues. However, if you really must put it in the "HTML" field, you will need to do something like this:



ta = ta[1].split('$[AMP]');

Thanks
Srini

View solution in original post

5 REPLIES 5

srinivasthelu
Tera Guru

Hi Sneha,



These lines are from wiki.   & needs to be replaced with '${AMP}' in your code i guess.



Ampersands in Jelly can cause you grief because Jelly is XML. Use ${AMP} to insert an ampersand in Jelly. If you are writing JavaScript that appears in the HTML part of say a UI page or UI macro that is actually going to run on the browser you are better off putting this code in the "client script" field and that way you can avoid escaping issues. However, if you really must put it in the "HTML" field, you will need to do something like this:



ta = ta[1].split('$[AMP]');

Thanks
Srini

Hi Srinivas,



${AMP} worked. thank u


bt using $, is this a best practice ?


Hi Sneha,



Glad that helped



$ in this case perfectly fine.



Thanks


Srini


Oh Great


Thank u