Oops, something went wrong 🙁 Error: Attempt to de-reference a null object.
-This error may happen when you attempt to generate a document and you are trying to reference object that your user does not have access too or the object is not active.
How to resolve:
1. Check the base object in document action and make sure correct base object API name is in there. If you are able to click “edit template” from document action and see all related fields to that object then you are using the correct API name.
2. Check that your Salesforce user has access to this base object and all other object fields being used in google doc template. The object and fields cannot be “read only” as this is restricted access.
3. Check the Salesforce sharing settings of the “Document Action” custom object and make sure set to public/edit access. You can follow these steps: Setup > Security Controls > Sharing Settings > Document Action > Change to a Public setting. If using any automation feature for app, also check the sharing rules of other custom object that comes with package “Document Request.”
4. Check that all required fields are populated in document action. For example, if you have only part of email section filled out but one field is missing that is required to send an email, it may cause this error. Example of this is if you have email set to “preview” function, then selected to send as “attachment” but then did not have the “email to” field filled out or email template ID, it may cause this error.
5. If checked all 4 above steps and still getting error message, there may be some hidden formatting in the google doc template. If you uploaded a word doc (.docx) directly to your google docs, then there may be some hidden formatting in the template causing the error message. We always recommend to start with a fresh google doc and copy section by section from your word doc template to make sure there is no hidden formatting that you may not be aware of.