// ServiceNow

Minimum attachment size control

If you want to set minimum attachment size control to sys_attachment table you can create business rule to sys_attachment table as you can below. (Turkish explanation is available).

var size = 10240;
if(current.size_bytes < size){
  
  if( current.content_type=='image/png' || current.content_type=='image/jpeg' || current.content_type=='image/gif'  ){
    gs.addInfoMessage( " Eklenti boyutu izin verilen sınırın altındadır. ( " + size + " ) " );
    current.setAbortAction(true);
  }
  
  
}

This code block will check attachment size and attachment type (jpeg,png,gif)

You can discart all image resized by your selection.

TR : Thanks to this code block, images below the dimensions you specify will not be added to the attachment table. You just need to add this code as a business rule on the sys_attachment table.

 

// JOIN THE CONVERSATION

Share your experience

Bir sorunun, farklı bir çözümün veya eklemek istediğin bir notun var mı? Giriş yapmadan da yazabilirsin.

// KEEP READING

One more note.

All posts ↗︎