Is selectRecordsAsync Deprecated in automations script?
Hi
This has worked for me for over 18 months and now it fails. The code is within an automation script block. The code window shows a strikethrough line in “selectRecordsAsync” and the tip suggests this method is deprecated.
Any ideas why and what alternative I have please?
let mgl_allocationsBase = base.getTable(“allocations”);
Hi @Claire_Conza - if you scroll down a bit further on the pop-up you will see the deprecation notice:
So your script will continue to work for now, but will fail at some point in the future. You can future proof it now by passing in the fields you need:
let table = base.getTable('Table 1');
let result = await table.selectRecordsAsync({fields: ['Name', 'Notes']});
Have a look at this post too, which passes all fields easily:
Hi @Claire_Conza - if you scroll down a bit further on the pop-up you will see the deprecation notice:
So your script will continue to work for now, but will fail at some point in the future. You can future proof it now by passing in the fields you need:
let table = base.getTable('Table 1');
let result = await table.selectRecordsAsync({fields: ['Name', 'Notes']});
Have a look at this post too, which passes all fields easily: