Manage visibility and 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.
Header 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: hide, required, disabled.
Value – Value attribute of the boolean type
Running the code above generates a JSON sub-structure on the quote header looking like this:
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 – Only the following buttons are supported: saveButton, submitButton, deleteButton, duplicateButton, emailCalculableButton, importExportButton, creationWorkflowSubmitAndNext and creationWorkflowBack.
Key – Only one key is supported: hide.
Value – Value attribute of the boolean type
Header Logic Snippet
def qp = quoteProcessor
if (qp.isPrePhase()){
qp.setRenderInfo("submitButton","hide",true)
}
Since the Cuba Libre version, you can:
Fields
To modify the visibility or editability of header fields, use the
qp.clearRenderInfo("fieldname") or
methods.qp.setRenderInfo("fieldname","key","value")
The
qp.setRenderInfo
method has three arguments:hide
,required
,disabled
.Running the code above generates a JSON sub-structure on the quote header looking like this:
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.saveButton
,submitButton
,deleteButton
,duplicateButton
,emailCalculableButton
,importExportButton
,creationWorkflowSubmitAndNext
andcreationWorkflowBack
.hide
.