Discussions
Check if at least one file has been attached to a case?
Hello,
We have a business case where we need to ensure our tech support always uploads a PDF signoff sheet to the case he is working on, before he can close a case.
Would this be possible via suitescript?
I tried this client script (Save Record function) but it doesnt fire:
//this script doesnt check case status (closed or some other status) so far
function saveRecord(){
var files = nlapiGetLineItemCount('mediaitem');
if(files == 0)
{
alert('Please upload a signoff sheet before closing the case.');
return false;
}
else
return true;
}
Please help.