I have a field that needs updating whenever relevant data changes. It's a field called "searchableData", which is used primarily for eSQL queries and resultant portal filtering. I don't want it to be a calc field, because it includes related data and will therefore incur performance issues, so it's a plain text field.
Is it safe to do the updating in a triggered OnRecordCommit script? I'm aware that this a layout-based trigger, so that the updating of the searchableData field relies on the data being updated (only) via the layout. But if I watch out for any other ways to update the data (via other scripts etc.) and do a "manual" update of the field separately in these situations, is this a sound approach? Or is there a better way?