How to show custom attachment UI page text for just one specific CSM Catalog item.

Zoro
Kilo Expert

The requirement I have is to generate a popup message when a customer is adding an attachment to a specific Catalog item request (CSM - case form).  I think it would be better just to update the UI page following the method below:

https://community.servicenow.com/community?id=community_question&sys_id=91c37d26dba52700afc902d5ca9619fd

But that will change the attachment message everywhere and not for just the case form.  So I was going to try to add some Jelly code to the attachment page to only run if the catalog item being requested is = to this catalog item's name.

Is this the best way to handle this?  Or is there a UI Action I can create/change to use a custom UI page so I don't have to change the out of the box version?

Or would it be better to somehow create a UI Action that popups up a separate message that comes up before the UI Page to add the attachment?

I work for the state and we recently implemented ServiceNow.

Also, will dot walking allow me to pull the catalog item (maintain items record) from the case record that is being updated?

Thank you

 

 

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I would recommend trying that community question and then check for other approach

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

add this code at the beginning of the UI page; ensure you give sys_id of the CSM catalog item there

<script type="text/javascript">
		$j( document ).ready(function() {
		var url = top.location;
		if(url.toString().indexOf('8f50ba324ffa8810fc11fa218110c764') > -1)
		alert("Attachment Icon Clicked Disclaimer for CSM Catalog Item");
		});
	</script>

screenshot below:

find_real_file.png

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar @Zoro 
I need to show the alert message when clicking OOTB "Add Attachments" action in specific CSM portal for all catalog items. Can you help me how to find OOTB "Add Attachments" action present in all catalog items?

Zoro
Kilo Expert

Thank you. I am testing this out 🙂