Attach a file in Catalog Item as attachment and alert while submit

SNOW46
Tera Contributor

Hi All,

I want to attach one Excel Sheet as an attachment in one Catalog Item so that whenever form loads the attachment will be visible and any user can download it.

And once the user downloads the attachment will fill it up and again attach the same.

While clicking on Submit I want an alert to be popup if user forgets to attach the file in the Catalog Item.

Can anyone let me know how to achieve this?

 

 

Thanks,

SNOW@Das

17 REPLIES 17

Hi 

In the above script try with this

var isOnServicePortal = parent.document.URL.indexOf('your_portal_id?id=sc_cat_item') != -1;//for example https://XXX.service-now.com/sp?id=sc_cat_item

Hi,

  An attachment  should be attached to the specific  catalog item. And you can use the UI Macro as

<a href= "/sys_attachment.do?sys_id=xxxxxxxxxxx" target = "_blank">Click Here</a> to download. 

Use the Macro variable to download a form.

 

 

Client Script : OnSubmit

if(current.hasAttachment(true))

{

alert("msg");

}

Thanks,

Vinu

SNOW46
Tera Contributor

Hi Vinu,

Can you post some screeshot for me like how can I achieve the same?