This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.
When using the below code within a script,
console.log(table.getView("Grid view"))
The return object needs to include visible field Names and IDs from the target view.
Currently, there is NO way to automate the return of visible field names/ids from views. View names must be hardcoded at script level, which is an utter pain. OR, the script author may simply start to return all fields within a table, which is a wasteful practice.
Anyone who writes Scripts with the Scripting Extension or the Automation Script action.