1 - create a custom view for your locations field under contract, create a file in this path client\custom\src\views\contract\fields\locations. js and paste the code below
Code:
define('custom:views/contract/fields/locations', 'views/fields/link', function (Dep) {
return Dep.extend({
getSelectFilters: function () {
if (this.model.get('accountId')) {
return {
'account': {
type: 'equals',
attribute: 'accountId',
value: this.model.get('accountId'),
data: {
type: 'is',
nameValue: this.model.get('accountName')
}
}
};
}
},
getCreateAttributes: function () {
if (this.model.get('accountId')) {
return {
id: this.model.get('accountId'),
name: this.model.get('accountName')
}
}
}
});
});
Code:
{
"fields": {
"locations": {
"type": "link",
"view": "custom:views/contract/fields/locations"
}
}
}
Hope this helps

Leave a comment: