Home Search

DriveWorks Pro 22
CPQ Custom Fields

Send Feedback

CPQ Custom Fields

This Template allows the addition of Custom Fields to store alongside a record.

Record Types, which allow Custom Fields to be added, are Accounts, Contacts, Items and Orders

Each of the Record Types have a specific SQL Table for Custom Fields.

These Tables are named driveApp-CPQ-<Type>-CustomFields; where <Type> is either Accounts, Contacts, Items or Orders.

Each record will have its own row in the corresponding Custom Fields table.

For example: if you create a new Account and add Custom Fields, a new data row will be created in both the Accounts table, and the Accounts-CustomFields table.

These data rows will then be linked.

The process for setting up a Project for either Accounts, Contacts, Items or Orders is identical.

Creating a new Custom Fields Project

  1. Create a new Project from the CPQ Custom Fields template.
  2. Open the Project in DriveWorks Administrator.

Modifying the CPQ DriveApp SQL Database

  1. Find the CPQ DriveApp database in SQL Server Management Studio
  2. Design the driveApp-CPQ-<Type>-CustomFields table; where <Type> is either Accounts, Contacts, Items or Orders'
  3. Add a new column for the new Custom Field you want to add (the name of this column will be needed later when configuring the Custom Field Project).


    The column must be set to Allow Nulls

Configuring a Custom Field Project

To add new custom fields, add new Controls to the Fields Form and then add corresponding new rows to the CustomFields Calculation Table.

The Calculation Table has 5 columns, 2 are required to be completed for each new row:

  • DataName is the name of the corresponding column in theSQL CustomField table. The DataName value and the column name must match exactly.
  • CurrentValue should be linked to the return of the related control in most cases. This value is what will be saved as the new Custom Field value if the record is saved.

The other 3 columns are used for the functioning of various features within the DriveApp and in most cases will not need to be edited.

  • ExistingValue this is the value that is passed from DriveApp as the current value of the CustomField for the record you are editing.
  • DataChanged compares the ExistingValue and CurrentValue column values to see if a change has been made.
  • SyncValue used when using the CPQ Data Sync tool. This column operates similar to the ExistingValue column, but based on the return data from a CPQ sync.


The Height of the Fields Frame Control on the Details Form may need updating, so that it shows any new controls that are added.

Instruct the CPQ DriveApp to use the new Project

  1. In the CPQ DriveApp, click the Settings icon and select CPQ Settings.
  2. Select the Custom Fields tab and check the check box alongside Custom Order Fields Project Required.
  3. Select the newly created Project from the Combo Box that appears.
  4. (Optional) select the Inline check box to have your Custom Field Project shown underneath the regular controls in the DriveApp. If unchecked, the Project will be shown as a dialog instead.
  5. Click Save to save the changes.

Click this button and the form edited in the sections above will appear as a dialog.

Filling in the fields and saving the dialog will store the Custom fields in the DriveApp-CPQ-Contacts-CustomFields Database Table.

Remember, the process for creating Custom Field for Accounts, Items and Orders is the same as the one documented above.

Accessing Custom Field Values

Values that are stored as Custom Fields can be accessed from the other Templates that can be used with the CPQ DriveApp.

There are 4 Stored Procedures that are available to use within the CPQ DriveApp Database:

  • driveApp-CPQ-SP-GetAccountCustomFields
  • driveApp-CPQ-SP-GetContactCustomFields
  • driveApp-CPQ-SP-GetOrderCustomFields
  • driveApp-CPQ-SP-GetItemCustomFields

For the connection string, you can use the following rule: