7px
04/11/2022, 9:01 AMrecord.getSublists()
. However, attempting to reference the sublist using the returned sublistId with record.getSublist()
returns null, leaving me with little to no options on how to access the list.
Am I correct to assume that NS detects the child record list in the parent record as a sublist, but cannot read its values as one? If so, how do I go about accessing it? Clearly I can "see" it using record.getSublists()
, but any attempt to make a reference to it using documented methods turn up moot.
Checking the documentation on Custom Child Record Sublist IDs
doesn't help either. I've copied and pasted the exact same IDs on the script in multiple variations to no avail. I'm unsure at this point if I'm just forgetting a permission or access issue or I'm loading the sublist wrong.
EDIT: After much testing, I've determined that using context.newRecord.getSublists()
returns sublists, but passing the newRecord object in a log.debug()
shows it doesn't actually contain the values of said sublists. I tried loading the record using record.load()
, and passing it through the log.debug()
reveals all the values of the sublist in question. That said, is there any way to access the sublist in UserEventType VIEW
?ehcanadian
04/11/2022, 1:22 PM7px
04/12/2022, 12:36 AMehcanadian
04/12/2022, 12:41 AM7px
04/12/2022, 7:21 AMrecord.load()
instead, and fetching the sublist values from there.
It's extra steps, but it gets the job done. My only qualm is how child record sublists are terribly unsupported, as firing tests using the Advanced PDF templates
show that even that can find the sublist but can't render the data in it.
Thanks regardless, your input was highly informative regarding the issue.