Document Generator: Save Changes Back to Salesforce

To enhance the efficiency of your workflow, we have added the ability to save changes and additions made in the Document Generator and pull those changes back into a Salesforce record.

In order to complete this action, you have to configure the fields Enable Saving to Record and Save to Record Modal Fieldset.

Enable Saving to Record

If the Enable Saving to Record field value is set to true, it allows for the saving to Salesforce records for the indicated Document Generator section. You will see a button displayed for each section, including the sections containing children record - for each record.

Enable Saving to Record should be enabled for the appropriate section.

Save to Record Modal Fieldset

The Save to Record Modal Fieldset field contains the name of a fieldset for any additionally required fields when saving back to a record. These fields will be combined with the Document Generator Section Fieldset fields to resolve issues with validation rules or required fields for records that aren’t added to the Document Generator Sections. These fieldset fields will be combined with the Document Generator Section Fieldset fields.

To configure additional fields create a fieldset on the corresponding Object and add fields that should be additionally displayed in modal before saving to record.

If an already existing field on a form is added to the fieldset, the value will be taken from form, but setting it as Required will be taken from fieldset.

After the fieldset is created, populate its full APIClosed API, or Application Programming Interface, is used by customers to create custom career portals or to take advantage of Data Mirror/DataMart. Bullhorn prefers to use REST API. name to the new field Save to Record Modal Fieldset on Document Generator Section Custom Metadata Type on the appropriate record.

Configure

  1. Add new fields Enable Saving to Record and Save to Record Modal Fieldset to the page layout for the Document Generator Section Custom Metadata Type.
  2. Check Enable Saving to Record for the required section Custom Metadata Type records and save them.
  3. For the objects where additional fields are involved in the save process, create additional field-sets for required object, add the required fields to be shown on Save to Database modal window and populate the field-set name into.

How it Works

Button Availability

Initially, the Save to Record button placed on the Document Generator ection record is grayed-out. When at least one field on the record is changed, the button becomes available. After the user clicks the button Save to Record, an attempt to save the record is performed. This action will update existing records or create new records, as appropriate.

Save

Successful

  1. If the saving record process was successful, record fields get updated as determined by user input.
  2. After that refresh, the Record View is fired.
  3. The Save to Record button greys out again.

Fail

  1. If saving fails for some reason, a modal window with fields from form and additional fieldset opens.
  2. Complete filling in the forms and fields.
  3. Click Save.
    • An attempt to save the record is performed.
      • If saving record was successful, record fields get updated.
  4. If the saving record fails, the error toast is displayed and the modal window remains open.

Assumptions & Behavior Specifics

  • If the section contains Formula fields or Read-Only fields, they won’t be a part of the saving process. After saving those fields will be populated with values from the record.
  • If required fields are not populated on the DocGen form, the Save to Record button will be disabled. Required fields should be populated before the button will become available.