I also tried using lineInit as per below but that ...
# suitescript
p
I also tried using lineInit as per below but that did not work:
function lineInit(type, name){
if ((type == "item") && (name == 'custcol4')) {
var usefx = nlapiGetCurrentLineItemValue('item','custcol4');
if (usefx == "T"){
console.log("true");
nlapiSetLineItemDisabled('item','custcol5',false);
}
else {
nlapiSetLineItemDisabled('item','custcol5',true);
}
}
}
b
go through the documentation for Client Event Types
event types dont share all parameters
p
Also, it's good practice to change IDs on your fields so that you know what they actually are (or the poor dev that looks at your code later on....)
k
Using custcol* is kind of against suitescript since this might change in the future without any prior notice. If its not bfn certified code you can use vanilla js to achieve this