Hello! Anyone recently had issues with accessing a...
# suitescript
b
Hello! Anyone recently had issues with accessing a child record sublist via script? Example:
Copy code
recordObj.getLineCount({
sublistId: 'recmachcustrecor102'
})

it's returning -1
Allow Child Record Editing
is checked
n
No, I've done that very thing recently. Maybe open a parent record in the UI and double check the sublist ID is correct? ("custrecord102"... ugh, maybe also change that to a more meaningful id if you have the power to 😉 )
b
thanks for the input! appreciate it. It's not the actual id 😅 i just used a sample. But yeah, I even logged recordObj.getSublists() and it's not showing there. 😞
n
Ok and when you open a record in the UI you have records in the sublist and if you explore the record object see the sublist just not in script? (note through the UI)
Like this:
b
it's not there as well. I only see the sublist in the UI.
a
Does the sublist has elements?
If the sublist is empty you may no be able to see it even with script you need at least one child...
b
Hello! Yes, the sublist have elements