How to make attachment mandatory in a record producer creating an incident?

muktha1
Tera Guru

I have a record producer form creating an incident . It is accessed from the service portal. Attachment has to be made mandatory before submission of the form. Can anyone please suggest the best way to achieve it in Service portal? Thanks in advance

11 REPLIES 11

muktha1
Tera Guru

Hi Mark,

 

Thanks for the reply. I think we will not be able to use DOM methods. We are using London version. Is there any other way to achieve this?

Hi there,

We are currently also running this on London.

 

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Other way could be to edit the Service Portal widget (see Göran Lundqvist's video's about that). Though, knowing that Madrid has an out-of-the-box feature for this, I would not recommend doing this.

The Madrid option:

find_real_file.png

If my answer helped you in any way, please then mark it as helpfull.

Please mark this answer as correct if it solves your problem. This will help others who are looking for a similar solution.

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi Mark i am using your code on service portal but still after attaching the attachment its giving me alert again to attach the attachment .

Pankaj Bisht1
Giga Guru

We did this in one of our record producers .

 

In the client script, we used this code in our onSubmit.

 var count = getSCAttachmentCount();
    if(count <= 0) {
	 alert('You must attach the completed form before submitting this request.');
	return false;
		   }

Thank you

Pankaj