Reputation: 175
Is there a way to check a folder for new files or to check the age of a file?
For example, if I have a few files in a folder, is it possible for me to find out which one is the newest using JavaScript?
Upvotes: 0
Views: 344
Reputation: 7343
You can also do a saved search using SuiteScript:
x = nlapiSearchRecord('file', null, ['folder', 'anyof', YOUR_FOLDER_ID], [new nlobjSearchColumn('created').setSort(true)]);
You will get the recently created file first in the search result.
Alternatively, you can create the Document search from UI as suggested by @RUSTY and then load the same search using nlapiLoadSearch()
API
Upvotes: 2
Reputation: 2840
You can probably do a document search and sort the results by Date Created in descending order.
Upvotes: 2