How can I resolve the part of the url after the do...
# suitescript
r
How can I resolve the part of the url after the domain for a file in the file cabinet? I thought url.resolveRecord() but apparently there's no record.Type.FILE?
e
Looks like using a recordType of 'file' gives you this error:
nlapiResolveURL: type argument file is not a valid record or is not available in your account. Please see the documentation for a list of supported record types.
Looks like files arent* supported by url.resolveRecord()
Likely not what you're looking for but you can use file.URL to get the full URL
s
You can get the URL from a search
s
i'd try
Copy code
mediaitem
because that's probably closer
but search is probably way safer
r
The search.Type enum looks pretty much the same. No FILE, only FOLDER.
b
use the string
file
as the searchType
s
You can also join to the
file fields...
on a folder search