record.getLineCount() return zero
My record is a project. Using the browser gui WBS looks good.
record.getSublists() contains "wbs"
Still, record.getLineCount({ sublistId: ‘wbs’ }); only returns “0” despite I can see in gui wbs contains rows.
How can it be gui shows data but script have no data?





2ps
Please check out this [stack overflow answer which answers your question].(https://stackoverflow.com/questions/52172297/netsuite-unable-to-get-sublist-line-count) The sublist id will be RECMACH + the script id of the custom wbs record
danbys
Tnx. Thus, I’m not working on a custom record. “Allow Child Record Editing” is not applicable to “standard” record that I’m working on. Any other ideas?
2ps
My bad, I think what you will have to do is to search for wbs records where the project equals the project of interest. The schema browser (https://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2021_1/script/record/wbs.html) seems to imply that wbs is a first class record that you can search for directly.