Create URL Field in Document Action
Steps to create URL field to save a Google Doc URL on base object record (using Opportunity as base object for this example):
- Go to Setup>Object Manager>Opportunity.
- Create New Custom field.
- Field type is URL (Label field Opportunity Doc URL or something unique)
- Click through steps to save new field and then copy API name – in format like “Opportunity_Doc_URL__c”.
- Go to the Document Action and paste this API name (without quotation or merge field brackets around it) into the field labeled “Save URL to Salesforce Field.”
- Now go to an Opportunity record to click custom button to merge document.
- After document is generated, the URL field will be populated on record.
- Click URL link to edit document from Opportunity record which will display in new window. When the document is ready, you can then download the document as a PDF and attach it to the record.
Additional Options: If you want to email a link to your Google Doc for PDF download, you can review this article.
Note on Feature Limitations:
- This feature cannot be used with document action feature to “auto delete google doc after merge” as you need to keep the URL in order to access it.
- This feature can only work if 1) User generates document manually or 2) User generates document using automation.
- Using Apex method to generate document will not update field defined in rsdoc__Save_in_Field__c. This will need to be done manually in the Apex code.