In Pricefx UI you can:
- Manage visibility and editability of quote/contract/agreement header fields.
- Hide the Submit and Save buttons.
To modify the visibility or editability of header fields, use the qp.clearRenderInfo("fieldname") or qp.setRenderInfo("fieldname","key","value") methods.
| Code Block |
|---|
| title | 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:
| 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.
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, creationWorkflowBack, addFolder, addItems, browseItems and browseRecommendedItems. - Key – Only one key is supported:
hide. - Value – Value attribute of the boolean type
| Code Block |
|---|
| title | Header Logic Snippet |
|---|
|
def qp = quoteProcessor
if (qp.isPrePhase()){
qp.setRenderInfo("submitButton","hide",true)
} |
You can also dynamically hide buttons using JSON definition of Quote Types.
In Pricefx UI you can:
Fields
To modify the visibility or editability of header fields, use the
qp.clearRenderInfo("fieldname") ormethods.qp.setRenderInfo("fieldname","key","value")def qp = quoteProcessor if (qp.isPrePhase()){ qp.setRenderInfo("userGroupEdit","hide",true) }The
qp.setRenderInfomethod has three arguments:hide,required,disabled.Running the code above generates a JSON sub-structure on the quote header looking like this:
"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.saveButton,submitButton,deleteButton,duplicateButton,emailCalculableButton,importExportButton,creationWorkflowSubmitAndNext,creationWorkflowBack,addFolder,addItems,browseItemsandbrowseRecommendedItems.hide.def qp = quoteProcessor if (qp.isPrePhase()){ qp.setRenderInfo("submitButton","hide",true) }You can also dynamically hide buttons using JSON definition of Quote Types.