Custom Forms Configuration How-Tos
Can we have several embedded Custom Form tabs inside one standalone Custom Form?
We can have only one detail tab per standalone Custom Form. We must create embedded Custom Forms and add them to the main standalone Custom Form configuration to have several tabs.
{
"default": {
"name": "default",
"translationKey": "common_default",
"icon": "compress-arrows",
"tabs": {
"details": {
"name": "details",
"translationKey": "Enterprise Buy",
"type": "details",
"icon": "file-info-alt"
},
"embeddedCFO1": {
"icon": "file-info-alt",
"name": "embeddedCFO1",
"type": "customForms",
"typeReference": "embeddedCFO1_name",
"translationKey": "cfo1 name"
}
"embeddedCFO2": {
"icon": "file-info-alt",
"name": "embeddedCFO2",
"type": "customForms",
"typeReference": "embeddedCFO2_name",
"translationKey": "cfo2 name"
},
"embeddedCFOx": {
"icon": "file-info-alt",
"name": "embeddedCFOx",
"type": "customForms",
"typeReference": "embeddedCFOx_name",
"translationKey": "cfox name"
}
}
}
}
How to access the parent inputs /outputs from an embedded Custom Form?
The api.find()
method returns the whole Custom Form object (CFO), including its inputs and outputs. For example, inputs can be accessed as follows:
def customForms = api.find('CFO', Filter.equal("id", 1))
customForms.get(0)['inputs']
The former way of accessing CFO inputs and outputs is kept to maintain backward compatibility:
def cfo = api.find("CFO", 0, api.getMaxFindResultsLimit(), "-attribute2", ["id","inputsJson","outputsJson"],Filter.equal("typedId", parentTypedId))
How to read embedded Custom Forms from standalone custom header logic (Quote, Rebates, Sales Compensation, etc.)?
How to access parent from embedded child Custom Form?
How to fetch the values from an embedded Custom Form in Quote header logic?
Found an issue in documentation? Write to us.
Â