Author Archive

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

Full Error Message:
“Insufficient Privileges. You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. For more information, see Insufficient Privileges Errors. ”

  • You may see this error message if a Salesforce user is restricted to any of objects or components being used with the app. For example, does the user have access to document action object and the base object being used in document action to build template? You can check sharing settings by going to Setup > Security Controls > Sharing Settings. Click “edit” if you need to change the settings on any object.
  • Another reason you could see this error message is if you installed the app package for Admin’s only rather than All Users. This type of install would restrict the app package components to any non admin users. You may need to uninstall the app package and then reinstall it from AppExchange for all users. We suggest to submit a case to Salesforce support to make sure this is what you need to do. If you have configurations setup in org that you want to save or want assistance from our Consulting team to do this for you, contact support@ramseysolutions.com to link you with Consulting  team.
  • Steps to uninstall the package: Setup > Installed Packages > RS Documents > Click on “uninstall package.” You will have to make sure no custom buttons are on page layout or any other fields in use that in preventing you from uninstall. You will get an error notification after trying to uninstall letting you know the steps needs to successfully uninstall. Then once uninstall is complete, you should go to permanently uninstall it.

Document Action Button/Link Code for Lightning Experience Users

“Save” your Document Action to Generate Custom Code: 

Once you have completed all needed fields in document action, click “Save” to save your Document action. A completed Document Action will auto-generate Action ID and Button/Link Code:

  • Button/Link Code. Code for the Button or Link that will be used for Document generation (copy this value to your clipboard, you will need it in the next step).
    • IMPORTANT NOTE for LEX USERS Using Opportunity Object: If you created the document action in Lightning experience and using Opportunity as your base object, there will be an extra value added to custom code in front of your object ID in document action: http://. So you need to remove this from button code when pasting into custom button. This will only happen if you create the document action in Lightning Experience, this will not happen if you create in Classic and use in Lightning Experience.
    • For example, the final button code at bottom of saved document action will say
      INCORRECT:
      “/apex/rsdoc__GenerateDocument?id={!http://Opportunity.Id}&templateId=GDT-000000&attach=true&output=pdf&emailAction=Preview&emailTo=&emailTemplate=&emailToAdditional=&emailCC=&emailBCC=” though when pasting your code into custom button, you will want to remove this added hyperlink to object (http://) so the final code you would paste correctly is:
      CORRECT:
      “/apex/rsdoc__GenerateDocument?id={!Opportunity.Id}&templateId=GDT-000000&attach=true&output=pdf&emailAction=Preview&emailTo=&emailTemplate=&emailToAdditional=&emailCC=&emailBCC=”
    • In addition you can manually setup what Salesforce fields to update upon Document Generation by adding in the end of this code next variables: &fieldtoupdate1=StageName&fieldtoupdatevalue1=Proposal Sent, where:
      • &fieldtoupdate1= API Name of the field that you want to update (Opportunity stage in our Example)
      • &fieldtoupdatevalue1=New value of the field (In our example new value will be “Proposal Sent”)
      • Put  consequential  after variable if you want to update more than one field: &fieldtoupdate1=API_Field1&fiedtoupdatevalue1=Field1_NewVale….&fieldtoupdateN=API_FieldN&fiedtoupdatevalueN=FieldN_NewVale*field to update cannot be used with boolean fields, like checkbox

Error Message: Error: 401. “Request is missing required authentication credential.”

Full Error Message:
Error while creating new document. Error message: Error: 401. Error description: { “error”: { “code”: 401, “message”: “Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.”,”status”: “UNAUTHENTICATED” } }

-You may get this error message when trying to generate a document though your google drive has not  been connected and app unauthorized. Or it needs to be reconnected after package install update or major change in RS Documents process.

How to resolve:
-First you need to make sure this user is an assigned app user by following our activation instructions.
-Second, you want to decide if you would like each app user to authorize their own drive or if you would like only one Salesforce user to authorize the app and the google drive for ALL app users to generate documents too. See this article for more detail on this optional feature.
-If you would like each user to authorize the app and their own drive, each user will need to go to “RS Documents Configuration” tab and click “Grant access.” Then you will follow the steps to connect your google drive account you would like to use to generate documents. You can click here if you need to create a new gmail/google account.

My colleague who configured the app is leaving company, how do I make for a smooth transition for document generation?

We suggest to test under the new user prior to original app user leaving if possible. This will make for a smoother transition between users and google drive settings:
1. Open up current google doc templates that are being used in active document actions (can access by click on the “here” button from above the embedded template builder within document action or find the template directly on your company drive if applicable).
2. Notice the sharing/permission sets on original google doc templates made by colleague if you would like to keep it the same with new template (keep original template IDs copied on clipboard or place in folder on computer or google drive).
3. Go to “File” and then “Make a Copy” of each of your google doc template and save it to the new users google drive so that they become the owner of the new google doc templates.
4. Replace the current template IDs with the new IDs in each related document action. inOnce you have the new templates copied to your google drive,
5. Go to RS Documents Configuration tab to authorize app and google drive to be used with new user and new template IDs already in document action(s) and make sure your user is an active assigned user to the app following end of our activation instructions).
6. Then test document generation under new user. If you find an error message, do a search in our Knowledge Base to see if you can find related error article. If you are unable to find and not sure what issue is, submit a case to support with more detail and provide login access to Ramsey Solutions.
7. Have new user review any needed support articles for more detail on setup and instruction (begin with “Getting Started” section).

Use Case: Can I merge an image into header of each related list table?

Consulting Reply:
You can “insert” a header or footer into document and can merge fields and images there. You can also insert an image merge field into top of table though we don’t think there is a way to make the table header repeat on each page as the related list repeats.  One thing we can try to figure as possible option is allowing the page to break and controlling that and merging other tables filtering on the quote line items.  Such as maybe calculating the characters or lines in the description field and using that to try to group the line items into pages and merging them in groups for each page.  There may be something else in Google docs functionality to try to just get it to repeat a header for the table on each page.

I am using “download file” feature in RS Documents but do not see the document go to my Downloads folder on computer. What am I doing wrong?

It is mandatory that you allow Pop Ups from Salesforce domain as browsers are interpreting this “download” action as a popup in new window. If you are’t sure if your pop ups are already approved, you will notice that when you attempt to generate a document for download to your computer, there is usually an indication that a pop up was blocked and you have the option to approve that URL for the future. Once the URL is approved, you should not have to do this step again.

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 RS Documents domain.

Use Case: Does RS Documents have the ability to group items in a related list based on the value of a specifiable field when generating document?

Full Use Case:
I have 4 records on a related list and I print them to a document:

Record 1
Record 2
Record 3
Record 4

But let’s say there is a field on each record called Team with two values, “Team A” and “Team B”. If Records 1 and 2 have “Team A” in this field and Records 3 and 4 have “Team B” in this field, would it be possible to group these records by this field so the output to the document would look like:

Team A
Record 1
Record 2
Team B
Record 3
Record 4

Thereby the records are all group by the value of a specific field. How can I configure this use case?

Consulting  Reply:
You can split the merge of the related lists with a filter on the group. You can also develop a sorting of the related list to sort by the group. If you need assistance with configuring this, we have a team of consultants at Ramsey Solutions if you would like to be connected.

I am using “download” feature in document action and do not see a preview of document after I generate, how does this feature work?

The “download” app feature is not meant to open up a preview of the document automatically after you generate document (screen flashes to let you know a download happened but it does not auto open document in another window). The download feature is only to download a copy of the document to your computer, which would show in your “downloads” folder. So you would need to open your downloads folder on computer in order to see it. The only way to bypass this step is you have another setting on your browser to automatically open the download document or using “Preview” program on a MAC to auto open downloads or can configure Chrome browser by inserting the ‘rs doc link’ in the ‘allow pop-ups’ page.

Another option is to access the document within Salesforce by using document action is to “attach file to record” which you could then access the document under Notes & Attachments or maybe files if you using files instead. Or you can use the “save URL link to Salesforce” feature and have a URL link to google doc right there from same window (users would need to have access to open link by your sharing settings in document action and access to your google drive that documents are stored on AND you would not be able to use app feature to “delete google doc after merge” in document action). Or you could configure email feature in document action to then send generated document to an email outside of Salesforce.

Use Case: What is an example process that could be setup using batch mode?

Example use case using Batch Mode/Document Request Object and customer goal is to generate 2,000+ receipts: 

  1. Could setup a Process Builder under Contact object that when box is checked on Contact record (example checkbox could be “Send Receipt”), this will trigger the Process Builder automation that creates new Document Request record. The document request record is a link between Document Action and your record (Contact in this example).
  2. Process Builder automation then creates new Document Request record. The document request record is a link between Document Action and your record (Contact in this example).
  3. Scheduled RS Document batch job runs on the background every 4-6 minutes and is looking for any Document Requests with the Status = New. Then it executes the Document Action for these requests, generates Documents and marks the status to “Completed”.
  4. The Scheduled Batch Job can only process 20 records at a time. Then it waits another 4-6 minutes to process next 20 records in the queue.
  5. Currently, the RS Document process keeps processing all the Document Requests that were created and are in status “New” (and with this example would need to go through several batches to create receipts from  2,000+ records). In order to process to the next batch of Document Requests, batch mode needs to complete all the previous Requests that are in the queue.

I do not see the Google Doc Advanced Sharing setting “Anyone with the link,” why is that?

If you do not see the “Anyone with the link” as an option for sharing/permission settings on your Google doc, then you have some strict sharing settings setup on your company Google Drive and the Super Admin of your drive will need to alter the settings to be able to generate documents with app, see steps below in this article:

  1. You can review this article to know how to check all Super Admin settings to share templates outside of your company: https://support.google.com/a/answer/60781?hl=en. Select drop down for “Let Users Share with Anyone” and make sure your drive settings match this. The goal is to be able to share your google doc template/folder OUTSIDE of your company since this is a requirement to process documents with RS Documents app (since our google script/user is not within your company).
  2. Important setting: “Allow External Users to Preview File without Google Sign in.” This should be the correct setting and NOT “Require Sign-In for external Users to view file.”
  3. Another important setting: “Allow users in [Organization]. to publish files on the web or make them visible to the world as public or unlisted files