Reference Field
Properties
Reference values can be displayed in two ways.
Ways
Way 1
Default Value
General
Reference value as a regular field (such field should be ready only)
Status
Release Available | Status | Framework Name |
---|---|---|
Initial | Current | TBC |
Code JSON
Copy
{"fieldName": "genesis__Application__r.genesis__CL_Product__r.clcommon__Product_Name__c",
"fieldUi": {
"fieldType": "string", "label": "Product Name",...
},...}
Way 2
Default Value
General
Reference value as an array of reference objects (such field should be editable as reference picklist)
Status
Release Available | Status | Framework Name |
---|---|---|
Initial | Current | Mint |
Code JSON
Copy
{"fieldName": "Party_Type__c",
"relationType": "reference",
"relationName": "Party_Type__r",
"relationJson": actual JSON embedded,
"fieldUi": {
"fieldType": "reference", "label": "Party Type",...
Refer to another component JSON file to form the reference picklist
Reference Field Text
In an editable view, the reference field loads its values from the backend in real-time.
Status
Release Available | Status | Framework Name |
---|---|---|
Initial | Current | TBC |
Code JSON
Copy
{
"fieldName": "Party_Type__c",
"relationType": "reference",
"relationName": "Party_Type__r",
"relationJson": "portal2demo_party_type_reference",
"fieldUi": {
"fieldType": "reference",
"label": "Party Type",
"defaultValue": "BORROWER",
"messages": {
"referenceLoadingText": "Loading party type...",
"referenceErrorText": "No party type available",
"requiredErrorText": "..." "regexErrorText": "..."
}
Dependent Reference
Reference values can be conditionally fetched by specifying its whereClause
.
Status
Release Available | Status | Framework Name |
---|---|---|
2.10 | Current | TBC |
Property
Copy
"property": {
"referenceWhereClause": { "Account": { "industry": "$this.attr(Account.Industry);" }
},
"whereClause": { "contactId": "003f400000ekVXXAA2" }
}
Action
Copy
{
"fieldName": "Account.Industry",
"fieldUi": { "fieldType": "picklist", "selectOptions": [...], ... }
}, {
"relationType": "reference", "fieldName": "AccountId", "relationName": "Account",
"relationJson": {
"tableName": "Account",
"whereClause": { "freeForm": "industry = ':industry'" },
...
}}
Reference field with Default Value
The reference field can set the default value. The default value (defaultValue
) is the visible text instead of the record Id
.
Status
Release Available | Status | Framework Name |
---|---|---|
2.10 | Current | TBC |
Code JSON
Copy
{
"relationType": "reference",
"fieldName": "AccountId",
"relationName": "Account",
"relationJson": {...}
"fieldUi": {
"fieldType": "reference",
"defaultValue": "Q2 eBanking" }
}
Features
Reference Field as select buttons
Default Value
General
Reference field can be displayed as select buttons.
Status
Release Available | Status | Framework Name |
---|---|---|
3.3 | Current | MUI |
Code JSON
Copy
"fields": [{
"id": "…",
"fieldName": "…",
"relationType": "reference",
…
"fieldUi": {
"fieldType": "selectbuttons",
…
}
}