Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Since the Cuba Libre version, you can:

  • Manage visibility and editability of editability of quote/contract/agreement header fields.
  • Hide the Submit and Save buttons.

Fields

To modify the visibility or editability of header fields, use the qp.clearRenderInfo("fieldname") or qp.setRenderInfo("fieldname","key","value") methods.

Code Block
titleHeader Logic Snippet
def qp = quoteProcessor
if (qp.isPrePhase()){
 qp.setRenderInfo("userGroupEdit","hide",true)
 }

The qp.setRenderInfo method has three arguments:

  • Field name – All quote/contract/agreement fields shown in the header input portlet are currently supported. The field names correspond to the names in the JSON data structure.
  • Key –  Header fields support these three keys: hiderequireddisabled
  • Value – Value attribute of the boolean type


Running the code above generates a JSON sub-structure on the quote header looking like this:

Code Block
"renderInfo" : {
	 "userGroupEdit" : {
	 "hide" : true
	 }
 },

The UI can now evaluate the instructions as it sees fit, i.e. the field names as well as the available key value pairs are not restricted/enforced by the backend.

Buttons

You can hide a button using the qp.setRenderInfo("buttonname","key","value") method.

  • Button name – There are five buttons currently Only the following buttons are supported: saveButton, submitButton, deleteButton, duplicateButtonemailCalculableButton, importExportButtoncreationWorkflowSubmitAndNext and  and creationWorkflowBack.
  • Key –  Only one key is supported: hide
  • Value – Value attribute of the boolean type
Code Block
titleHeader Logic Snippet
def qp = quoteProcessor
if (qp.isPrePhase()){
 qp.setRenderInfo("submitButton","hide",true)
 }