I have looked through a lot of Netsuite's documentation and searched on stackoverflow and do not see this currently answered.
I basically want to lock down (disable end user from changing) certain fields on a Sales Order that affect margin after certain conditions are met. I have been able to lock down the fields I wanted on the item level, but I realized they can still add/copy/delete an item, which affects margin as well.
I do not want to lock down the entire item sublist - we want them to be able to edit minor things, but the actual items cannot be added/copied/deleted.
Any ideas how I can do this? Basically somehow remove the buttons for add/copy/remove?
EDIT: Due to the removal of my Javascript tag, I will explain it's purpose. This removal, because at the line level, I know will need to be done in SuiteScript- Javascript using NetSuite's API. It is relevant to note this is the language I am trying to utilize.
Code: To explain what I have done so far, below is some pseudocode:
function pageInit(){
if(currDate >= dLockDate && type == 'edit'){
//lock SO Date (header level)
nlapiDisableField('trandate', true);
}
}
In lineInit://locks down some fields at the line item level
function lineInit(){
if(type == 'item'){
//list of items to disable
var a_itemDisFields = ['rate', 'quantity','porate','amount', 'item'];
for(var i = 0; i < a_itemDisFields.length; i++){
nlapiDisableLineItemField('item',a_itemDisFields[i] , true);
}
}
}
Similiar to the above two functions, where I disable fields, I want to disable the ability to add a line item. I do NOT want to lock the whole record (as I am aware I can do from a Workflow), but rather I want to stop users from being able to add/copy/delete Items in the Item sublist.