Hello, has anyone tried to use SS2 with `window.op...
# suitescript
l
Hello, has anyone tried to use SS2 with
window.opener
? I found a Suite Answer that kinda answers my questions, but lacks any explanation or working example: https://netsuite.custhelp.com/app/answers/detail/a_id/88583 What I need to do is to disable sublist field on a record, using Suitelet. I would have used SS1, but looks like
nlapiDisableLineItemField
started to make entire column inactive, not just a field.
b
unless you happen to be working with a list type sublist, the sublist disabling suitescript disables entire columns
so that sounds normal
you can use either suitescript 1 or 2 for the task, with the sa article describing how you have to use the require function from the opening window
l
Thanks, but you have summed up what I have already done. I know I can use either, I know the article is describing on how to use the require function, but I can't get it to work and thus asking if anyone tried that and perhaps have some working example.
b
if you are trying to disable a field in a single row, nothing you can do from the suitelet will help
doesnt matter if you are doing ss1 or ss2
l
Hm, I would swear I was able to do that a while ago... Anyway, that's disappointing
b
the general solution for only disabling a single row is to disable the field in all the rows and undisable it as necessary using a client script lineInit entry point
you can use window.opener to set a global (or perhaps a field if you want to avoid globals) to control which rows you want to trigger the undisabling or disabling code
l
Clever, thanks!