The Kintone API allows you to get an element depending on the page and field as below, so I would think those are the best way.
●kintone.app.getFieldElements(fieldCode) at Record list Page
●kintone.app.record.getFieldElement(fieldCode) at Record Details Page
(Cannot be called on the Record edit/create page, or the notification page)
●kintone.app.record.getSpaceElement(id) at Record Details/Create/Edit Page