- 13 Jan 2025
- 3 Minutes to read
- Print
- DarkLight
Relay Pull PDF Action
- Updated on 13 Jan 2025
- 3 Minutes to read
- Print
- DarkLight
Available with Relay package version 1.24+
The RelayPullPDFAction is used to pull a PDF document generated from a Relay Power-up form submission. Once downloaded, a ContentDocument link to the specified linkedEntityId will be created.
NOTE
This flow action starts a background job that preforms the actual downloading of the PDF. If an error occurs in this job, a record will be created on the RelayLog__c custom object.
Action Dialog
Action Input Values
Field | Description |
---|---|
clientId | Optional. The Send via future flow action input instructs the Relay action on how to make the callout. If set to True, the action will make the callout in an apex future. If set to False, the action will make the callout in the normal path. If the action is already running as a scheduled flow, or in the asynchronous branch of the flow, you are technically already running in a future so you can always pass in a value of False. Leveraging a future is useful to prevent delays in processing of the flow's primary logic. Valid values are:
|
description | A description for the ContentDocument |
documentLinkShareType | The permission granted to the user of the shared file in a library. This is determined by the permission the user already has in the library. If this field is not provided, then the value of ‘V’ will be used. Valid values are:
See Salesforce docs: ContentDocumentLink |
documentLinkVisibility | Specifies whether this file is available to all users, internal users, or shared users. If this field is not provided, then the default value of ‘AllUsers` will be used. Valid values are:
See Salesforce docs: ContentDocumentLink |
linkedEntityId | Optional. If the shouldCreateDocument field is set to {!$GlobalConstant.True}, then this field must also be provided. This field identifies the Salesforce entity (record) that should be liked to the ContentDocument. For example, this could be the Id field of a Person Account object. See Salesforce docs: ContentDocumentLink |
shouldCreateDocument | Specifies if the action should create a ContentDocument and ContentDocumentLink to the entity identified by the value in the linkedEntityId field. If this field value is not provided then a default value of {!$GlobalConstant.False} will be used. Valid values are:
|
submissionId | Required. The Relay Power-up form submission ID. This identifies the PDF that should be downloaded. |
title | A title for the ContentDocument. |
Action Response Variable
The action returns a custom Relay object RelayPullPDFAction.PullPDFResponse.
Field | Description |
---|---|
contentDocId | If the shouldCreateDocument request field was set to True and the action was successful, then this field will contain the Id of the ContentDocument record that was created. See Salesforce docs: ContentDocument |
contentDocLinkId | If the shouldCreateDocument request field was set to True and the action was successful, then this field will contain the Id of the ContentDocumentLink record that was created. This is the link that was made between the ContentDocument and the entity identified by the linkedEntityId field in the request object. See Salesforce docs: ContentDocumentLink |
contentVerId | If the shouldCreateDocument request field was set to True and the action was successful, then this field will contain the Id of the ContentVersion record that was created. Salesforce automatically creates a DocumentVersion for every document. See Salesforce docs: ContentVersion |
pdfBlob | A Blob object that contains the binary PDF data.
See Salesforce docs: Blob Class |
statusCode | Valid values are:
|
statusMessage | If the action was successful this value will contain the text “OK”. Otherwise, this field will contain the reason for the failure. |