Anyone getting weird errors w/ client script entry...
# suitescript
c
Anyone getting weird errors w/ client script entry points in regards to the context.currentRecord? Its a dynamic record but if I try to use getCurrentSublistField to get access to a sublist column for disabling, i get an error that it isn't a function but it 100% is an available dynamic record function and the context log even says its a dynamic record. Field Change is behaving the same way so I have to pass along the context.line which doesn't make any sense either and there is no line on the pageInit context so this is just jacked.
n
I am facing something similar. In pageinit, I wanted to use commitinventory.isdisabled = true; but it won't let me do it. However, it does let me do it for all other line fields like orderpriority and all. Also, one thing here was that nlapiSetLineItemDisabled for this field is working fine. It's just a SS-2.0 thing here.
c
This is a bug.. it has to be
n
So it seems.
Me and @karlenigma do agree it's a bug. That's what it is.
c
i mean its clearly not in the dynamic record as you can see in my screenshot there and its available in the API docs... so they either removed it and told nobody or its a bug
When using fieldChanged it also gives a dynamic record yet getCurrentSublistField isn't a method there as well
n
It is a bug. The NS behavior regarding Sublists and Subrecords have been questionable ever since I have known NS. On another note, I think you might as well give it a try in SS-1.0 if you can. Because I ended up writing my code in SS-1.0 because it allowed that. For what it's worth, you may give it a shot.
c
With field changed im fine as that gives me a line number as well. Line init does not or i could get around that at least... i may be able to just fire the field change on my fieldChanged field and get around it that way as well for this particular thing as I can't write any new 1.0 code.
👍🏻 1
BTW i loaded a record via record.load in dynamic mode and getCurrentSublistField is available
netsuite 1
n
Also, raise a case to NS. Doubt that'll help much. 😝
c
Unfortunately, I do not have the power to do that but ill see if someone can tomorrow
e
Just yesterday I was seeing something similar where the
N/currentRecord.CurrentRecord
does not have all the same methods as
N/record.Record
, regardless of Standard/Dynamic mode
c
Yep, something is definitely wrong. I don't know why they would be different... def a bug it seems