function beforeLoad_addButton(type, form) {
// The second parameter of the event it will return the current form of the record
form.setScript('customscript_add_button'); // sets the script on the client side
form.addButton('custpage_buttonalert', 'Delete IF', 'onclick_callAlert()');
}
function onclick_callAlert(){
var RecID = nlapiGetRecordId()
nlapiDeleteRecord('itemfulfillment',RecID);
window.location.reload();
}