External Form and sending email with PDF attachment

Viewed 15

I have a custom record that has an external html form. I also have a user event script that sends an email with a pdf attachment that is rendered using render.create. My issue is that when an external user completes the form they are getting error that says:

{"type":"error.SuiteScriptError","name":"INSUFFICIENT_PERMISSION","message":"Permission Violation: You need the 'Lists -> Documents and Files' permission to access this page.

The xml file that is used to create the pdf is set to Available Without Login.

How can I add this permission to an external user?

1 Answers

The error is probably occurring when the User Event script tries to save the pdf file. This would occur if the script deployment has the "Execute As Role" field set to "Current Role" which is the default. You can set this field to "Administrator" or any other role with the required permission to overcome this issue.

Related