Some time attachment is not getting attached in the attachment variable in service catalog

Ankush Jangle
Tera Contributor

Hello All ,

 

I am using attachment variable in the service catalog ,For that we made the attachment field mandatory on the condition via UI policy and also wrote the on submit client script to make the variable mandatory but still some time attachment is not getting attachment any reason behind this please help me on this.

 

And when the attachment is not getting attachment at that time the variable is not visible on RITM and task

 

Thanks in Advance . .

5 REPLIES 5

Hi,

did you add alert and check?

use this and share the alerts

function onSubmit() {

	var req_type = g_form.getValue("iserve_avon_details_type_of_request");
	alert(req_type);

	if (req_type == "extension") {

		var attach_id = g_form.getValue("iserve_avon_reason_attachment");
		alert(attach_id);
		if (attach_id == "" || attach_id == undefined) {
			alert("Please add Attachment");
			return false;
		}
	}

}

Regards
Ankur

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