Author Archive

Error getting access token. Error: internal_failure

Full Error Message:
Error while creating new document. Error message: Error getting access token. Error: internal_failure. Error description: null.

You may have app feature setup to have one user force authorization over others per this article. To resolve, check your configurations of this feature and reauthorize the app under the user that is forcing authorization. If you do not have this feature setup, you should refresh your app authorization under your individual user following this article.

Error 403: Insufficient permissions for the specified parent

Full Error Message: 
Error while creating new document. Error message: Error: 403. Error description: { “error”: { “errors”: [ { “domain”: “global”, “reason”: “forbidden”, “message”: “Insufficient permissions for the specified parent.”, “locationType”: “other”, “location”: “parent.permissions” } ], “code”: 403, “message”: “Insufficient permissions for the specified parent.” } }

  • You may see this error message if you specified a Google Drive folder ID within document action and your user does not have sufficient access to this folder within the google drive.
  • Solution: You can remove the folder ID from the document action and see if that resolves the error message. If it does, then you can modify the permissions for that folder on the google drive and then once updated, add the folder ID back into document action.

Grant Login Access to A5 Apps Support

Video for to grant login access to A5 Apps support in Salesforce Classic

If you are using Lightning Experience, follow these steps:
– Click on user pic icon in top right corner.
-Under your name, click on “Settings.”
-On Left side, you’ll see Personal Information and from that dropdown click on “Grant Account Login access.”
-Find A5 Apps support and update for however long you can give support login for.

Error Message: Export only supports Docs Editors files

Full Error Message:
Error while creating new document. Error message: Error: 400. Error description: { “error”: { “errors”: [ { “domain”: “global”, “reason”: “badRequest”, “message”: “Export only supports Docs Editors files.” } ], “code”: 400, “message”: “Export only supports Docs Editors files.” } }

App Expert Reply:
You may see this error message if you are trying to use a template format other than google docs (for example word document). The app only supports google doc format templates and can refer back to this article for more detail. Once you have created a google doc file, you can update the template ID within document action and test once again to ensure error is resolved.

Package Update Release Notes

Package 2.116 (Released on 8/19/2021)

  • Record Id and Attachment Id saved on Document Request record – We have added the following fields on the Document Request object that are populated when a document is generated – regardless of whether it is generated manually or automatically. These fields allow customers to configure a Process Builder, Flow, or Apex on the Document Request object to copy the Attachment Id value when the status of the Document Record is “Complete”  to the base object if this value is needed anywhere else.
    • Record Id – Id of the record that has initiated Document Request (e.g. Opportunity Id)
    • Attachment Id – After Document is created this will contain Id of the generated Attachment/File
    • Google Doc URL – After Document is created, this will contain URL of the generated Google Doc
    • For more information, please see this article: Automate Document Generation

Package 2.114 (Released on 07/30/2021)

  • Download File and Delete Google Doc After Merge – Users can now set a Document Action to both download a file and delete a Google Doc after merge.
  • Update to DocGen Authorization Page – After installing the A5 Documents app, when users click the DocGen Configuration tab, only the Grant Access button will be enabled. This is to make it clear that the user is not authorized yet. Similarly, after clicking on the Grant Access button, the user will be redirected to the Google Drive authorization page and immediately after allowing access to the Google Drive, the Grant Access button will be disabled while the Revoke Access button will be enabled. This is to make it clear that the user authorization was successful.
  • Batch Mode – The Batch mode section on the Administrator VisualForce page has been reinstated in order to allow customers to manually enable Batch Mode in order to resolve Document Requests stuck in “New” status due to problems with guest site user permissions. Once enabled, the Batch Job will be scheduled and it will execute after every x minutes (number of minutes must be set in Document Settings>Batch Timeout field). For all other customers that don’t have problems with a Document Request stuck in “New” status, Batch mode on the Administrator VisualForce page must be disabled because their Batches are executed through the Document Request trigger.
  • eSign Preview Validation Rules
    1. Validation rule on Document Action created to prevent saving a value to both the Signer 2 Required and Witness Required fields at the same time.
    2. Validation rule on document Action created to prevent saving a record when a value is saved to the Witness Required or Signer 2 Required fields and Email template is blank.
  • Signer 2 Checkbox Field – New checkbox field (Signer 2 Required) has been added to the Document Action layout. If Signer2Required equals true, after creating the new document and redirecting to the Email preview page, Require Signer 2 dropdown will be set to “Yes” and Signer 2 NameSigner 2 Email, and Signer 2 Email Template will be merged to the on the preview page. 
  • Searchable Picklist – When selecting a Document Action from within the Generate Any Document Action button, you will see that we have replaced the combobox picklist from the Aura component with the searchable picklist Lightning Web Component.
  • Auto Email with Email Additional To – You can now auto send a document using the Email Additional To field instead of the Email To field. This feature allows you to auto email a document to an email address that is stored in a field. 

Package 2.109 (Released on 12/24/20)

  • Execute Any Document Action – You can now assign certain document action templates to a group and configure a default group within the custom button code to only show templates from a certain group when generating document. More details defined in this article.
  • Batch Mode – Batch Mode Automation improvements and changes to automation article. With this package update users no longer need to manually enable batch mode as it enabled already. The standard automation method is utilizing the Document Request custom object and more details defined in this automation article.
  • Related List in Related List – You can now merge an additional related list from a child object using this new feature that is detailed in this article.
  • Monthly Document Generation Limits – Update to monthly document generation limits. Limitation of 10,000 documents for 1-10 user licenses. Can see this article for more detail on limitations and pricing.
    • In coordination with feature above, you will not be able to delete document request records used for automation as the document needs to exist in order for the app to know the monthly document count. You will be able to delete the Document Requests after the current month period is over.
  • App Authorization Fix – Fix of DocGen Configuration to save authorization token if you received bad request error when authorizing the app.

Package 2.101 (Released on 07/20/20)

  • Salesforce Security Regulations – Latest Salesforce security regulations with app users requires users to have at least read access to fields and objects in use with document generation. If users do not have proper access to fields in use, they may see an error message referring to inaccessible field.
  • Merge Additional PDFs – Package update also includes new feature to merge additional PDF documents into document generation per this article.
  • Conditional Section Merge Fix – Fixed feature issue with Google Apps Script for conditions when all the filtered records have the condition false.


Error: Insufficient Privileges – You do not have the level of of access necessary to perform the operation you requested.

Full Error Message:
Insufficient Privileges: You do not have the level of of access necessary to perform the operation you requested.   Please contact the owner of the record or your administrator if access is necessary.

App Support Reply:
First you want to ensure the user receiving error message is an assigned user to the app. If they are, then that user may see this error when trying to generate document if they have strict permissions on their profile that is causing restricted access to the app components and objects in use to trigger document generation. The user should have A5 Documents classes and VisualForce pages enabled on their profile.  You can create a permission set for this user and allow them access to the following components: Document Action, Document Request, A5 Documents VisualForce pages. After creating this permission set, the users should be able to create documents without the error.

Using Chrome Browser for Document Download

  1. To check your pop-up settings in Chrome Browser: chrome://settings/content/popups?search=pop. You will want to make sure you allow Pop Ups from Salesforce and/or A5 Documents domain. If you using download feature with Chrome browser and being asked to re-authorize the app with google drive when generating a document, you can modify google drive settings in document action to set document visibility to company or public so other users can download it.
  2. Google Chrome has reported some blocking of Mixed Content Downloads:
  3. To avoid mixed content, broken images, or failed downloads, you can do the following:
    • Choose not to upgrade Chrome.
    • Use an alternate browser that allows mixed content.
    • Roll back to a previous version of Google Chrome.
    • Enable the Google Chrome mixed content flag. To enable the Google Chrome mixed content flag within Chrome, click the padlock icon in the URL bar → Click Site Settings → Find the Insecure Content dropdown. Then use the dropdown list to change Block (default) to Allow. Note that Google hasn’t announced how long this functionality remains available.

Error: Required fields are missing: [rsdoc__Document_Action__c]

Full Error Message:
rsdoc.OpportunityGenerateDocument: execution of AfterUpdate caused by: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [rsdoc__Document_Action__c]: [rsdoc__Document_Action__c] Trigger.rsdoc.OpportunityGenerateDocument: line 48, column 1

App Expert Reply:

When you are creating an opportunity, if you are specifying the RS Document to Merge field value, you have to set it as a document action name (for example GDT-000000), and you must have a document action with that name in your org.
Also when you are creating or refreshing developer or developer pro sandbox, document action records are not copied, so you need to create them. And the IDs will also be different.

Other feedback from specific customer case:

One specific reason that you may see this error is if you refreshed a developer sandbox, the Document Actions are not automatically copied from production to  sandbox environment. However, the automation workflows responsible for assigning proper Document Actions to RS Document to Merge parameter are copied to sandbox environment. This caused a conflict: RS Document to merge could not find the Document Action it was assigned to.
The above automation with workflows is described in the first 3 bullet points of this article about automation.
In addition to the above, when manually creating Document Actions on sandbox environment, the Document Action ID parameter cannot be edited manually (it is always assigned automatically to the next consecutive number) and in this customer case, it did not match the Document Action ID the workflows were referring to.
So for this case, after refreshing a developer sandbox, they need to manually adjust the field update workflows responsible for assigning RS Document to Merge, to point to the proper Document Action ID’s (valid for this particular sandbox).

A5 Documents Privacy Policy

You can view our privacy policy here or view information below. 

  1. A5 Documents is built on the Salesforce platform using Apex and Visual Force.  So you may refer to Salesforce Privacy Policy in regards to use of Salesforce.  Then A5 Documents uses your Google Drive account to get google docs for templates and to generate new google docs and save them into your Google Drive.  You control the access of your google docs within your Google Drive account for each document.  Then A5 Documents has a Google Script that is hosted on Google that processes the document requests to generate documents.  Please refer to Google’s Privacy Policy for more information about using their service.
  2. All the data comes with your own Salesforce org, and is processed on Google and saved within your Google Drive.  When you create a Document Action, you can set what sharing permission you want to set for new google documents generated.  A5 Documents itself does not process or store any of your data from Salesforce or from your Google Drive account.
  3. When you authorize your Google account to use within Salesforce under the RS/A5 Documents Configuration tab, you are authorizing Salesforce with the A5 Documents app to create new and modify your Google Documents.  The Oauth token of access is saved in a custom setting within Salesforce.  The authorization is also saved in your Google Account.  If you go to Apps Connected to Your Account page in Google you can see the list of 3rd party apps you have authorized to use your Google Account and can deauthorize A5 Documents there.  The access token is saved within your Salesforce org and A5 Documents does not have access to this directly.  Using that Oauth token saved in your Salesforce A5 Documents using Apex is able to make API calls to Google to create a copy of the template document in your Google Drive, then to update the document with the merge fields, then to set the sharing permission specified in the Document Action.  The Google Doc is saved within your Google Drive or in any Google Drive folder you specify that you have write access to.
  4. If you elected to generate another format than Google Doc like PDF, Word, then the file is generated and saved into your Salesforce org.  A5 Documents never processes or retains any of your data or files.  New files can be saved as Attachment or File within your Salesforce org. We have no access to your Google User data nor do we share any of your Google User data.
  5. For more detail on the security of the Google Drive platform, you can review this article.