Author Archive

How can I access past batch jobs created that may have failed?

You should first double check if batch mode is enabled on RS Documents Configuration tab. If you have batch mode enabled, it should create a Document Request record for each document generation request. And there is a status there for why it may have failed. They get cleared out after processed at some point. Check that first to see if any records are there not processed.

Most likely Apex class that is scheduled to run is “GenerateDocumentsBatch” though it might be one of the other Apex classes are apart of RS Documents package so you can try to check all Apex jobs.

Using RS Documents to Merge feature and do not see my document getting created or not populating all values from document action

Full Issue/Use Case
Using “RS Document to Merge” value from the Campaign.  A Document Request record is created however it is not linking to the Google Doc URL or updating all fields in document action. We are not getting any error messages.

If using batch mode for automation, try to disable it and then click save. Then click to enable it again and this will refresh the settings. See if that resolved the issue of document request record getting created and updating all document action fields.

Use Case: I want to control when a user can generate a document, how can I do that?

Full Use Case:
Is there a way to keep a user from merging/emailing a document unless a validation rule is passed? Or a certain field has a certain value? How do I control when a user can generate a document?

Consulting Reply:

We suggest to do one of the following:

1. Create a formula field on the object and in that formula field you can have an IF statement that checks for field criteria or even current user criteria and then if passes your needs then displays a link or even an image button that would then provide a link they can click which is the same link you put in the button code that you click to generate the document. If the criteria is not met then what we found cool is you can also provide text of what is wrong with the record in order to be able to generate the document to provide some guidance. Or can display anything you want. This makes the “button” to generate a document only available when the record is ready and can control it this way.

2. Create document generation by automation using process builder based on some field value changing. You can setup a checkbox for a picklist for example to set a value that would initiate the document generation to happen in the back end. As part of the document action also you could update that field value to unchecked or a picklist value like “Generated” after the document action has finished. The point here is that now you can put permissions and validation rules around changing this field that initiates the document action.

Use Case: How can I print my generated document?

To print your generated document: 

1) Option to download it right away (check box to ‘download’ document in document action) then you click to open it on recent downloads and then print PDF like normal.
***Option to auto open document in Preview if using a MAC.
2) You can print after you click to open the PDF from the Notes & Attachments related list (or Files if using LEX).
3) Click on google doc link you saved in a URL field after generated and print document from google drive. If you have a lot of documents on drive that you would like to print at once, you can save all Google docs to a Google drive folder then batch print from Google drive or by syncing to your computer and print them from there.

If you would like to configure a process to mass print your documents, see this article for more detail.

Use Case: How can I setup a process to mass print my generated documents?

Consulting Reply:
If you would like to setup a process of mass printing documents, we suggest to use feature in document action to save the google doc URL to a field (see this article for more detail on how to create this field and paste into document action). Then create a formula field that displays the button to generate the document and then shows a link to view/print it if it exists. Then document is generated and then in just one more click, you can open the document to print.

There is also a feature called Google Cloud Print that can auto print files uploaded to your google drive that could be even more efficient. No need to open the google doc, just gets printed when generated.

Another option would be to save the link to the PDF attachment/file into a field and then create a button or formula/button/link that is displayed to make it more efficient to click to open the PDF once saved. You would need to configure a Process Builder to do this.

My related list / child object field value is not populating the correct value or not populating at all on generated document. Why is it not working?

Related List field not merging on my generated document: 
I am trying to merge a child object field and when generating document, the incorrect value or no value is shown and I do not receive an error message. What am I doing wrong?

Support Reply: 

  1. First make sure there is a value to merge on the Salesforce record you generate document from (if it is showing blank on your document and not the merge field code).
  2. If there is a value to merge on record and it is showing the actual merge field from your template, then second thing to check is making sure you are merging the correct field with correct API name from template builder. Meaning, you may find the same display name for different fields so there is chance you are merging the wrong field from template builder. To find the correct field to merge, here are a few ways to troubleshoot:
    • From page layout on object record you would generate document from, find the related field you are looking to merge into template. Hover over the name of the field and find the API name. Once you have the API name (which will always be unique to every Salesforce field), then make sure the API name matches the merge field code when selecting desired field in template builder.
    • Another way to find the API name of the field is to go to Setup for your base object and find the API name of related field.
    • You can rename the field you are looking to merge so you know it is the correct one in template builder to select.
    • You can also merge all fields into template that you think may be the right field to merge (place a #1, #2, #3 next to start of each field) and then once you generate document you can see which field was the correct one and then remove the others.

If you would like more assistance to troubleshoot or find the right field to merge from template builder, you can purchase some premium support time. If we find it is an issue with our app or a bug then we would refund that support time back to you.

Error Message/Issue with Billing Address Merge Field

Full Error/Issue: 
Trying to merge {!Account.BillingAddress} onto my google doc template and when I generate document, the value does not merge. I do not receive an error message, it just doesn’t work.

You need to separate the billing address out into individual lines, by street, city, and zip code, etc. Once you separate these merge fields out on your template, the values will merge properly and will still look the same once document is generated. 

Use Case: Is it possible to store the files in AWS S3 and save the file path in Salesforce for accessing it from Salesforce UI?

Full Use Case:
Currently, we are storing the file in Google drive once its processed as standard app functionality. Is it possible to store the files in AWS S3 and save the file path in Salesforce for accessing it from Salesforce UI?

Consulting Reply:
Nothing in RS Documents will do this automatically.  But RS Documents can save a PDF in Attachments or Files as well as in Google Docs.  Then you can build a script or maybe there is some app that can automatically move attachments to AWS for example.  You can certainly build something to move Files and create a custom object to track for example using Apex code.  If you need any help we can offer consulting services to help develop the solution, contact our consulting team for more information.

Error Message: “Error while creating new document. Error message: Connection reset”

Full Error Message:
“Error while creating new document. Error message: Connection reset”

-You may see this error message when trying to generate a document and there is an issue with Salesforce doing performance degradation, service disruption, or maintenance in your server instance:
-Look for your server instance from this status report and see if there is any reported disruption from Salesforce. You can click on your server instance for more information. If you’re not sure what you server instance is, you can find it by looking at URL in open Salesforce window, example “NA78.”

How to resolve: 
Wait a few hours to see if Salesforce has marked your server instance as “available” and then test document generation once again to see if error now resolved.