Is it possible to make the internal ID dynamic in ...
# suitescript
j
Is it possible to make the internal ID dynamic in a script? users will be deleting the file and adding a new one everyday, I'm trying to avoid having to change the internal ID of the file on the script. Any way of making dynamic?
a
no you can't have any control of internal ids. will the file name rename the same?
oh you mean to reference it? sure you can do a foldersearch to get the id of files in the folder
👍 2
but if the file name will be the same they don't need to delete, if they're uploading via the file cabinet at least it will prompt them to overwrite existing when it sees the name collision
if its an integration of some kind... you'll need to search for file ids based on folder
w
You can use the file relative path (/SuiteScript/Folder/FileName.csv) instead of the ID assuming your are loading the file and getting it’s content.
n
If the filename is static but will be repeatedly deleted you can also do a search by name to retrieve the internalid.