When executing a suitescript that makes use of rec...
# suitetalkapi
r
When executing a suitescript that makes use of record.attach function to attach a file to a Vendor Bill record, what permissions are required for the script to execute the record.attach function?
p
don't think you need permissions for this... the file should already be in the filecabinet right? you just need the fileObjectid and the vendorbillrecid
Copy code
var attachedfileid = record.attach({
                record: {
                    type: 'file',
                    id: fileObjectid
                },
                to: {
                    type: 'vendorbill',
                    id: vendorbillRecid
                }
            });
this channel is aimed for the API questions 😉 if you have general suitescript questions try #C29HQS63G
r
Well it's not working currently. We can upload the file to the file cabinet using the file.create command, but the subsequent record.attach fails with INSUFFICIENT_PERMISSION - You do not have permission to perform this operation error
Ugh, why am I not seeing that channel...
😅 1
Thank you, I'll repost
p
no worries