Author Archive

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: 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

I cannot figure out why I am getting an error message or where it is coming from, what is best way to troubleshoot?

If you are merging a child object or related list item, you need to make sure field is merged inside a table so the rows repeat themselves. Review this article for more detail if needed. If you already did this and not sure why you are getting an error message and/or where it is coming from within your template, here are some helpful steps:

  1. It is best to find out which merge field is causing the error message and then you can better figure out how to resolve it.
  2. The best way to troubleshoot is by creating a blank new google doc (do not clone the other template), give it a simple non merge field title and update sharing settings. Make sure to use the same google doc sharing settings, same google drive, and same Salesforce user when testing with this new template.  Then with this new blank google doc, replace this ID in document action and then test document generation to make sure no error message.
  3. Then copy/paste one section at a time into your new template from the old template. After adding each section, test document generation to see if error happens or not. Once you get error message and know from which section or table, then you can try to isolate which error message out of that section is causing it.
  4. If you complete copying section by section of new template and you did not get an error message then there may have been some hidden formatting in that old template (this can happen if you upload google doc template from an existing word doc) and it should now be resolved.
  5. If you need more help to troubleshoot, you can purchase some support time and we will help you resolve. If we find it was an issue with our app or documentation, we will refund the money back to you.

Use Case: I would like to apply conditional coding and logic to generate different versions of the same template depending on SF record, can I use If/Then statements to do this?

Use Case:
Conditional Coding:  We will have some templates that will have different versions of.  For example, we have a template that contains 2 versions, a “lease” version and a “loan” version.  The idea would be to merge this document into one template but use conditional coding and logic to populate the appropriate details (ex. On the mentioned template there may be a field that should say “Loan Agreement” if the product is a loan but would then say “Lease Agreement” if the product is a lease).  In my past experience I have used “If / Then” coding to do this.  Does RS Documents allow for this?  

Consulting Reply:
Yes you can create a conditional merge section on a template.  You basically create a formula field that is a checkbox that can check the box on one condition or leave unchecked if another condition.  Then in the template builder you select this field and indicate to use it as a conditional merge section and you put this merge code in the beginning of the section and end of the section.

The other option around this type of concept is to create a formula that can provide lets say the title of the agreement and in the formula field you would have what ever logic you need to display “Loan Agreement” or “Lease Agreement”.  This could be good strategy if only a few things that are different.  Otherwise using conditional merge sections can make more sense when more differences.  Another option is having two templates.  And your button code you click to merge the document can have an if statement in the button code to decide which Document Action to use for the document based on some field value.  


Use Case: How can I combine multiple generated documents into one document before sending to customer?

Use Case:
Doc Packaging:  How can we take separate document templates and merge them into one file (a doc package) and then send that file to an external source (customer, vendor, etc.)?

Consulting Reply:
You should attempt to merge your templates together into one master template instead of different templates.  You can also take advantage of conditional merge sections in case there are parts of the master template you would not included based on a condition in the record.  RS Documents doesn’t have a function to merge multiple already merged documents together.  We have built this type of function for some other customers that has been custom since each scenario has typically been unique.  Let us know if you are interested in us building a custom function for this.  We would want to look at your use case and design the solution and code to work for that.  You can build something yourself or another developer you are working with.  Nothing quite out of the box but RS Documents can achieve the merging of each document, at which point you need to track the merge of those documents are complete, then a process to merge them all together.  As far as sending them, not sure if you mean by email or ftp, but we can help build this out if you would like.  We charge $175/hour for our consulting services and we can estimate hours for this task.

Error Message: Error: 400. Error description: “The description exceeds the maximum length.”

Full Error Message:
Error while creating new document. Error message: Error: 400. Error description: { “error”: { “errors”: [ { “domain”: “global”, “reason”: “invalid”, “message”: “The description exceeds the maximum length.”, “locationType”: “other”, “location”: “file.description” } ], “code”: 400, “message”: “The description exceeds the maximum length.” } }.

-You may see this error message when trying to generate a document and trying to merge too much description text onto your document. This is a new Google character restriction limit on description and you will need to install the latest package version that is available on AppExchange. Once the new package is installed, please go back to RS Documents Configuration tab to reconnect app with your Google drive.

Use Case: I would like to use RS Documents to print labels onto envelopes. How can I set this process up?

Use Case:
I would like to use RS Documents to print labels onto envelopes. How can I set this process up?

By default Google Docs doesn’t seem to have a page setup option for envelopes.  We would suggest looking at an add-on like this one to see if possible to setup the template:  We have not tested this ourself so you would need to see how it looks and if it would work. If not maybe could try to get the formatting to work for envelope print using google doc.  Also can maybe consider exporting to word?

Error Message: “Collection size 1,006 exceeds maximum size of 1,000”

Error Message:
Collection size 1,006 exceeds maximum size of 1,000

There is a published salesforce limitation of 1000 queries in VisualForce and Salesforce fails to loop through all templates by template ID to find the one to use Document generation. Visualforce is used to process the document generation and is launched when you click a button so if you see this error message when trying to generate document request, then your org hit this limitation.
-In this error message, user has 1,0006 email templates which is 6 over the 1,000 limit for email templates. So this user needs to delete at least 7 templates from their org to bring them to have 999 email templates in your org or less. Once your total email templates are 999 or less, you should be able to continue with document generation.

Use Case: Using Google Docs for Slide Presentation

Use Case:
What are some tools or tips that I can make my Google Doc template look like a Powerpoint Presentation or Google Slides since RS Documents only uses Google Docs format?

You can create new Google Doc as a template and change page orientation to landscape (go to File > Page Setup > Select “Landscape” > Click Ok). And if needed, you can also change page size. Then using our app you can produce PDF which would look like presentation file.

Change page setup of a Google Doc

  1. On your computer, open a document in Google Docs.
  2. In the toolbar, click File and then Page setup.
  3. Go to the setting you want to change:
    • Orientation – (Landscape)
    • Paper size
    • Page color
    • Margins
  4. Make your changes.
  5. Click OK.
  6. Optional: To make new documents open with the settings you chose, click Set as default.

You can view this Google article for how to upload a chart or slide presentation to your Google doc:

Use Case: Can documents still be generated from a custom button placed on an Visualforce page?

Use Case:
I want to know if documents could still be generated from a custom button placed on an Visualforce page.

Consulting Reply:
Yes, this would work, under condition that data displayed on the Visualforce page (and most likely used to in document) is saved in database. In general, it does not matter from where document generation gets executed (standard record page, Visualforce page or somewhere else) – it will get record id, document action id and other parameters and it will generate based on those parameters.

Use Case: Is possible to change the title name on all the document actions? Rather than using numbers, can I use letters?

Full Use Case:
Is possible to change the file name on all the documents. Can we modify the GDT (example GDT – 000004) standard to use letters instead? Our users find it hard to locating the file.

-You cannot modify the GDT-000x document action field as it is an autonumber and cannot be changed. But you can use the existing field called “Action Name” to provide description or name of an Document Action. You just need to drag this field onto your document action page layout if not already visible.