Hi,
I'm trying to create a Alert to pop up everytime a Order is Closed and Replaced.
right now, I wrote this using the Netsuite Help but its displaying a error.
function FieldChanged(type, name)
{
if (name == 'custpage_closeitems')
{
if (nlapiGetContext().getSetting('SCRIPT', 'custpage_closeitems') == 'T' {
field.setDefaultValue('T')
}
{
alert("Order is now closed, Don't forget to close PO. Please Inform Joanne and the Warehouse so item does not get despatched. Thank You");
return true;
}
The 'custpage_closeitems' is actually a custom button (dont know where this is store, but I just clicked on 'inspect element' on my firefox and it brought this up, so this is what the button is doing.. <input type="button" onmouseover="if(this.getAttribute('_mousedown')=='T') setButtonDown(true, false, this);" onmouseout="if(this.getAttribute('_mousedown')=='T') setButtonDown(false, false, this);" onmouseup="this.setAttribute('_mousedown','F'); setButtonDown(false, false, this);" onmousedown="this.setAttribute('_mousedown','T'); setButtonDown(true, false, this);" onclick="var rec = nlapiLoadRecord('salesorder', nlapiGetRecordId());var lines = rec.getLineItemCount('item');for ( var i = 1; i <= lines; i++ ){rec.setLineItemValue('item', 'isclosed', i, 'T');}nlapiSubmitRecord(rec,true);window.location.reload();return false;" name="custpage_closeitems" id="custpage_closeitems" value="G&H Close Order" class="rndbuttoninpt bntBgT" style="" _mousedown="F">
so Is there a way I can use this when a Order is closed to alert any user to inform the warehouse etc? Thanks