The parent() method returns the parent of a JavaScript Scheduler row object in the resource tree hierarchy.
DayPilot.Row.parent()This method has no parameters.
Returns a DayPilot.Row object representing the parent row. If the row doesn't have a parent, this method returns null.
const parentId = scheduler.rows.find("A")?.parent()?.id;Resource Tree [doc.daypilot.org]