So I've gone through and added
"contacts": {
"type": "hasMany",
"entity": "contacts",
"foreign": "child",
"layoutRelationshipsDisabled": false,
"required": false
}
and
"contacts": {
"type": "hasMany",
"foreign": "accounts",
"entity": "Contact",
"isCustom": true
},
to crm\application\Espo\Modules\Crm\Resources\metadat a\entityDefs\Account.json
and to crm\custom\Espo\Custom\Resources\metadata\entityDe fs\Account.json
also I've added
"account": {
"type": "belongsTo",
"required": false
},
and
"account": {
"type": "belongsTo",
"entity": "Account"
}
to crm\custom\Espo\Custom\Resources\metadata\entityDe fs\Contact.json
and I was about to do the same to
crm\application\Espo\Modules\Crm\Resources\metadat a\entityDefs\Contact.json
when I saw that it already had some odd link and field set up...
"account": {
"type": "link"
},
"accounts": {
"type": "linkMultiple",
"view": "Crm:Contact.Fields.Accounts",
"columns": {
"role": "contactRole"
}
},
"accountRole": {
"type": "varchar",
"notStorable": true,
"disabled": true
},
"accountType": {
"type": "foreign",
"link": "account",
"field": "type"
},
"account": {
"type": "belongsTo",
"entity": "Account"
},
"accounts": {
"type": "hasMany",
"entity": "Account",
"foreign": "contacts",
"additionalColumns": {
"role": {
"type": "varchar",
"len": 50
}
},
"layoutRelationshipsDisabled": true
},
should I just remove the code above and replace it with what I put into the other files?
my goal is that contacts are children of accounts, and that there's a field for this in the layout manager
"contacts": {
"type": "hasMany",
"entity": "contacts",
"foreign": "child",
"layoutRelationshipsDisabled": false,
"required": false
}
and
"contacts": {
"type": "hasMany",
"foreign": "accounts",
"entity": "Contact",
"isCustom": true
},
to crm\application\Espo\Modules\Crm\Resources\metadat a\entityDefs\Account.json
and to crm\custom\Espo\Custom\Resources\metadata\entityDe fs\Account.json
also I've added
"account": {
"type": "belongsTo",
"required": false
},
and
"account": {
"type": "belongsTo",
"entity": "Account"
}
to crm\custom\Espo\Custom\Resources\metadata\entityDe fs\Contact.json
and I was about to do the same to
crm\application\Espo\Modules\Crm\Resources\metadat a\entityDefs\Contact.json
when I saw that it already had some odd link and field set up...
"account": {
"type": "link"
},
"accounts": {
"type": "linkMultiple",
"view": "Crm:Contact.Fields.Accounts",
"columns": {
"role": "contactRole"
}
},
"accountRole": {
"type": "varchar",
"notStorable": true,
"disabled": true
},
"accountType": {
"type": "foreign",
"link": "account",
"field": "type"
},
"account": {
"type": "belongsTo",
"entity": "Account"
},
"accounts": {
"type": "hasMany",
"entity": "Account",
"foreign": "contacts",
"additionalColumns": {
"role": {
"type": "varchar",
"len": 50
}
},
"layoutRelationshipsDisabled": true
},
should I just remove the code above and replace it with what I put into the other files?
my goal is that contacts are children of accounts, and that there's a field for this in the layout manager
Comment