Skip to content Skip to main navigation Skip to footer

Create a Lightning Action to Send a Fax

Lightning Actions are an alternative to fax automation based on the creation of a Sent Fax record. Specifically, object-specific create a record actions make it easy for users to create records that are automatically associated with related records. The Lightning Action pre-fills fields on the Sent Fax record with values from the related record. Note that Lightning Actions would not be used for mass document generation as the user still needs to manually click the Action button from the record. 

Here are a few example use cases for a Lightning Action:

  1. Save users some manual steps when they want to fax an existing order authorization form from an order record. For this example, the base object would be Order and the target object would be Sent Fax. When the Action button is clicked, a new Sent Fax record screen appears with selected fields pre-filled from the related order record.
  2. Re-send a Fax that was not delivered. If you have a sent fax record that was “not delivered” due to ringing timing out or maybe fax machine off, you could create a Lightning action to resend another fax to with the same details. In this case, the base object would be Sent Fax and the target object would also be Sent Fax (this creates a new Sent Fax record that is associated with an existing Sent Fax record that was not delivered). Important: A Lightning Action would only be appropriate to use if the fax number were confirmed to be correct and no other changes needed. The “detailed fax status” field should be on the sent fax page layout so that, in the situation that a fax fails and its status changes to “not delivered”, the detailed fax status field will provide more information as to why the fax was not delivered.

How to create a Lightning Action to send a fax:

  1. Go to Setup>Object Manager. Select the base object for your Lightning action.
    1. For example, to fax an order authorization form from an order record, with fields on the sent fax record automatically populated with values from the order record, select Order as the base object.
  2. Select Buttons, Links, and Actions from the Object menu.
  3. Click the New Action button.
  4. Action Detail
    1. Label: Set a name for the button, e.g., Fax Authorization
    2. Action Type: Create a Record
    1. Object Name: Set this to the base object, e.g., Order.
    2. Target Object: The target object is the object of the new record you will be creating, e.g. Sent Fax.
  5. Pre-Defined Field Values: Add pre-defined values for the fields that you select by clicking New and selecting the Field Name. Depending on the field type, you will Select a Specific Value from a list of options (picklist) or use the formula editor to set a value.
  6. The required Pre-defined fields for a new Sent Fax record are listed below:
    1. Attachment ID (Text field type). This is the Id of the attached file that you want to fax, which is in the URL. For example, an example URL of  a File could be: https://myNamespace.lightning.force.com/lightning/r/ContentDocument/0695e000009GGcYAAZ/view and the document ID you would paste into the pre-defined field value to send same PDF file each time would be: 0695e000009GGcYAAW.
      1. Another option: When you generate a document with a document generation tool like Opero Documents, you can create a custom field on your related object that stores the latest attachment ID on the record. Merge this Attachment ID field value as the predefined field value for the Sent Fax record’s Attachment ID field.
    2. Fax Number (Phone number field type). Use the formula editor to set the value to the recipient’s fax number.
    3. Organization Fax Number (Phone number field type). This is your assigned default organization fax number.
    4. Send Date (Date/time field type). Important: use Send Date rather than Sent Date. Use the formula editor to set the value to Now().
    5. Sent with Outbound Message (Checkbox). Set value to equal “true”. You can add a message that you want to display after the sent fax record is created.
    1. Status (Picklist). If you are using the cover sheet feature, set the value to Generating Cover Sheet. After the cover sheet is generated, the status will update to Sending. If you are not using the cover sheet feature, set the status to Sending.
    2. Subject (Text field type). This is the subject of the fax. You can add merge fields here from the related object using the formula editor.
Example Lightning Action that creates a Sent Fax record that is automatically related to an Order record.