Download attachment button in workspace

Rosy14
Tera Guru

Hi,

I have a button in workspace. I want to download the attachment on it after clicking button. For platform view it is working but in workspace not. Plz help. Also I want to add the attachment sys_id . here i manually adding that.

Rosy14_0-1709719585074.png

function onClick(g_form) {
	var URL = '/sys_attachment.do?sys_id=0d93d8591bb442100f52a797b04bcb3e';
	g_navigation.open(URL, '_blank');

}
1 ACCEPTED SOLUTION

SatheeshKumar
Kilo Sage

hi @Rosy14 
Can you try     top.window.open(URL,'blank'); instead of g_navigation.open(URL, '_blank');

View solution in original post

3 REPLIES 3

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Rosy14 

 

You need to create the UX button mapping for same.

 

https://www.servicenow.com/community/next-experience-articles/introduction-to-declarative-actions/ta...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

SatheeshKumar
Kilo Sage

hi @Rosy14 
Can you try     top.window.open(URL,'blank'); instead of g_navigation.open(URL, '_blank');

Rosy14
Tera Guru

Thanks.. working