This Template allows the addition of custom fields to store alongside an order. These can then be accessed when an Order is edited in CPQ.
This template works by having a list of Control Names and a List of Values that are stored alongside the Order. When an Order is edited, these 2 lists are recursed through, setting the values of each control as they go.
This example tutorial shows how to add a new Custom Field Project to store extra values alongside Orders.
The first step is to add the necessary controls to the form. Example controls are provided. These can either be modified or deleted to add new ones.
This example adds one new Control to the Form and edits the Value Control.
|Width||Background.Width - (2*DWVariableFormPadding)|
|Enabled||DWConstantLockStatus = DWCurrentUserDisplayName|
|List Item Color||DWVariableOnWorkspaceFontColor|
|List Item Font||DWVariableParagraph|
="Order Type Information"
Your Form should now look like this:
Now that the Form has been completed, two pieces of information are to be passed to the CPQ DriveApp Order.
These two lists need to be in the same corresponding order.
OrderIndustryReturn & "|" & OrderTypeReturn
The order of the two lists matches (the first instance in both lists is for the OrderIndustry Control and Value pair, and the second is for the OrderType Control and Value pair). Regardless of how many items are in the list, the orders must match up for your Template Project to behave properly.
The 'Add Custom fields' option will now be available when an Order is edited.
Click this button and the form edited in the sections above will appear as a dialog.
Filling in the fields and saving the Order will store the custom fields alongside the order.