We can use the following catalog client script onSubmit
var gr = new GlideRecord("sys_attachment");
gr.addQuery("table_name", "sc_cart_item");
gr.addQuery("table_sys_id", g_form.getUniqueValue());
gr.query();
if (!gr.next()) {
alert("Attachment mandatory.");
return false;
}
var gr = new GlideRecord("sys_attachment");
gr.addQuery("table_name", "sc_cart_item");
gr.addQuery("table_sys_id", g_form.getUniqueValue());
gr.query();
if (!gr.next()) {
alert("Attachment mandatory.");
return false;
}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.