Hi, on a transaction, we need to make the rate fie...
# suitescript
m
Hi, on a transaction, we need to make the rate field for some of the lines disabled (based on criteria) is there a way to make sublist fields disabled for selected lines only? via SuiteScript / workflow I only see a way to make the whole column disabled
b
disable / undisable the column every time a line is selected
m
this makes the whole column (on all lines) disabled @battk
b
correct, which is why you rely on only one line being selectable
m
@battk, I'm not following - so, which entry point would be scripted in the CS?
b
usually requires a combination
lineInit is usually what you want
depending on your requirements, you may need to use pageInit if you want control over the new line when the transaction is first loaded
m
OK, so these are the respective events but there doesn't seem to be a method to set just the field on a single line as disabled NetSuite says you can only disable a full column
b
for rate in particular, you may end up having to use postSourcing, netsuite uses rate internally for a lot of its sourcing and as part of that process, undisables that field
you cant disable the field on a single line, as you said its the entire columns for inline editor type sublists
luckily, that doesnt matter, the user can only edit one line at a time
so they will never know you disabled the field on the other lines since you will disable/undisable it whenever they try to edit a different line
m
OK... that makes sense I'll try that - thanks!
y
Yeah, this is a problem to make a specific line custom field disable For a workaround I used jQuery to make it disabled or enabled sublist specific line field.
m
@yagyakumarnag - the solution suggested by battk worked - I implemented it yesterday