Hello everyone, I'm trying to attach pdf file to t...
# suitescript
d
Hello everyone, I'm trying to attach pdf file to the revenue arrangement record's communication tab and i'm using the below code var id = revenueArrangementRecord.attach({ record: { type: 'file', id: fileId // file internal ID }, record: { type: 'REVENUE_ARRANGEMENT', id: fileContentsArr[3] // internal ID of revenue arrangement record } }); this code is not working for me. could you please suggest any inputs? thanks in advance!
n
revenuearrangement is the correct record type.
c
for the Type argument, I believe you need to use a record.Type enum. for example: record.Type.REVENUE_ARRANGEMENT
1
d
@Corey Schwoebel yes I did and it worked now thank you :)
@NickSuite it is not correct usage I should've used record.Type argument instead. thanks!
n
yes, either record.Type enum or 'revenuearrangement' should have also worked.