Hi,
i try to replicate multiple assignedUsers with column and primary ..
but no luck.
i need column "role" as enum + primary. (else this code have no issue and work with only varchar role field)
No one have idea how do ?
Account.json
User.json
more info : https://docs.espocrm.com/administrat...assigned-users
i try to replicate multiple assignedUsers with column and primary ..
but no luck.
i need column "role" as enum + primary. (else this code have no issue and work with only varchar role field)
No one have idea how do ?
Account.json
PHP Code:
{
"fields": {
"assignedUsers": {
"type": "linkMultiple",
"layoutDetailDisabled": false,
"layoutMassUpdateDisabled": false,
"layoutListDisabled": false,
"noLoad": false,
"importDisabled": false,
"exportDisabled": false,
"customizationDisabled": false,
"isCustom": true,
"view": "views/fields/link-multiple-with-columns",
"columns": {
"role": "userRole"
},
"columnAttributeMap": {
"role": "userRole"
},
"additionalAttributeList": [
"columns"
]
}
},
"links": {
"assignedUsers": {
"type": "hasMany",
"relationName": "accountUser",
"foreign": "accountsAssigned",
"entity": "User",
"audited": false,
"isCustom": true,
"additionalColumns": {
"role": {
"type": "varchar",
"len": 100
}
},
"additionalAttributeList": [
"columns"
],
"layoutRelationshipsDisabled": true,
"columnAttributeMap": {
"role": "userRole"
}
}
}
}
PHP Code:
{
"fields": {
"accountsAssigned": {
"type": "linkMultiple",
"layoutDetailDisabled": true,
"layoutMassUpdateDisabled": true,
"layoutListDisabled": true,
"noLoad": true,
"importDisabled": true,
"exportDisabled": true,
"customizationDisabled": true,
"isCustom": true
},
"userRole": {
"type": "varchar",
"notStorable": true,
"exportDisabled": true,
"disabled": true
}
},
"links": {
"accountsAssigned": {
"type": "hasMany",
"relationName": "accountUser",
"foreign": "assignedUsers",
"entity": "Account",
"audited": false,
"isCustom": true,
"additionalColumns": {
"role": {
"type": "varchar",
"len": 100
}
},
"additionalAttributeList": [
"columns"
],
"layoutRelationshipsDisabled": true,
"columnAttributeMap": {
"role": "userRole"
}
}
}
}
more info : https://docs.espocrm.com/administrat...assigned-users
Comment