444 lines
14 KiB
JSON
444 lines
14 KiB
JSON
{
|
|
"fields": {
|
|
"name": {
|
|
"type": "personName",
|
|
"isPersonalData": true
|
|
},
|
|
"salutationName": {
|
|
"type": "enum",
|
|
"options": ["", "Mr.", "Ms.", "Mrs.", "Dr."]
|
|
},
|
|
"firstName": {
|
|
"type": "varchar",
|
|
"maxLength": 100,
|
|
"default":"",
|
|
"trim": true
|
|
},
|
|
"lastName": {
|
|
"type": "varchar",
|
|
"maxLength": 100,
|
|
"required": true,
|
|
"default":"",
|
|
"trim": true
|
|
},
|
|
"accountId": {
|
|
"type": "varchar",
|
|
"where": {
|
|
"=": "contact.id IN (SELECT contact_id FROM account_contact WHERE deleted = 0 AND account_id = {value})",
|
|
"<>": "contact.id NOT IN (SELECT contact_id FROM account_contact WHERE deleted = 0 AND account_id = {value})",
|
|
"IN": "contact.id IN (SELECT contact_id FROM account_contact WHERE deleted = 0 AND account_id IN {value})",
|
|
"NOT IN": "contact.id NOT IN (SELECT contact_id FROM account_contact WHERE deleted = 0 AND account_id IN {value})",
|
|
"IS NULL": "contact.account_id IS NULL",
|
|
"IS NOT NULL": "contact.account_id IS NOT NULL"
|
|
},
|
|
"disabled": true
|
|
},
|
|
"title": {
|
|
"type": "varchar",
|
|
"maxLength": 100,
|
|
"notStorable": true,
|
|
"select": "accountContact.role",
|
|
"orderBy": "accountContact.role {direction}",
|
|
"where": {
|
|
"LIKE": {
|
|
"leftJoins": ["accounts"],
|
|
"sql": "accountsMiddle.role LIKE {value}",
|
|
"distinct": true
|
|
},
|
|
"=": {
|
|
"leftJoins": ["accounts"],
|
|
"sql": "accountsMiddle.role = {value}",
|
|
"distinct": true
|
|
},
|
|
"<>": {
|
|
"leftJoins": ["accounts"],
|
|
"sql": "accountsMiddle.role <> {value}",
|
|
"distinct": true
|
|
},
|
|
"IS NULL": {
|
|
"leftJoins": ["accounts"],
|
|
"sql": "accountsMiddle.role IS NULL",
|
|
"distinct": true
|
|
},
|
|
"IS NOT NULL": {
|
|
"leftJoins": ["accounts"],
|
|
"sql": "accountsMiddle.role IS NOT NULL",
|
|
"distinct": true
|
|
}
|
|
},
|
|
"trim": true,
|
|
"textFilterDisabled": true
|
|
},
|
|
"description": {
|
|
"type": "text"
|
|
},
|
|
"emailAddress": {
|
|
"type": "email",
|
|
"isPersonalData": true
|
|
},
|
|
"phoneNumber": {
|
|
"type": "phone",
|
|
"typeList": ["Mobile", "Office", "Home", "Fax", "Other"],
|
|
"defaultType": "Mobile",
|
|
"isPersonalData": true
|
|
},
|
|
"doNotCall": {
|
|
"type": "bool"
|
|
},
|
|
"address": {
|
|
"type": "address",
|
|
"isPersonalData": true
|
|
},
|
|
"addressStreet": {
|
|
"type": "text",
|
|
"maxLength": 255,
|
|
"dbType": "varchar"
|
|
},
|
|
"addressCity": {
|
|
"type": "varchar",
|
|
"trim": true
|
|
},
|
|
"addressState": {
|
|
"type": "varchar",
|
|
"trim": true
|
|
},
|
|
"addressCountry": {
|
|
"type": "varchar",
|
|
"trim": true
|
|
},
|
|
"addressPostalCode": {
|
|
"type": "varchar",
|
|
"trim": true
|
|
},
|
|
"account": {
|
|
"type": "link",
|
|
"view": "crm:views/contact/fields/account"
|
|
},
|
|
"accounts": {
|
|
"type": "linkMultiple",
|
|
"view": "crm:views/contact/fields/accounts",
|
|
"columns": {
|
|
"role": "contactRole",
|
|
"isInactive": "contactIsInactive"
|
|
},
|
|
"orderBy": "name"
|
|
},
|
|
"accountRole": {
|
|
"type": "varchar",
|
|
"notStorable": true,
|
|
"layoutDetailDisabled": true,
|
|
"layoutMassUpdateDisabled": true,
|
|
"layoutFiltersDisabled": true,
|
|
"exportDisabled": true,
|
|
"importDisabled": true,
|
|
"view": "crm:views/contact/fields/account-role",
|
|
"textFilterDisabled": true
|
|
},
|
|
"accountIsInactive": {
|
|
"type": "bool",
|
|
"notStorable": true,
|
|
"select": "accountContact.is_inactive",
|
|
"orderBy": "accountContact.is_inactive {direction}",
|
|
"where": {
|
|
"=": {
|
|
"leftJoins": ["accounts"],
|
|
"sql": "accountsMiddle.is_inactive = {value}",
|
|
"distinct": true
|
|
},
|
|
"<>": {
|
|
"leftJoins": ["accounts"],
|
|
"sql": "accountsMiddle.is_inactive <> {value}",
|
|
"distinct": true
|
|
}
|
|
},
|
|
"layoutListDisabled": true,
|
|
"layoutDetailDisabled": true,
|
|
"layoutMassUpdateDisabled": true
|
|
},
|
|
"accountType": {
|
|
"type": "foreign",
|
|
"link": "account",
|
|
"field": "type",
|
|
"readOnly": true,
|
|
"view": "views/fields/foreign-enum"
|
|
},
|
|
"opportunityRole": {
|
|
"type": "enum",
|
|
"notStorable": true,
|
|
"options": ["", "Decision Maker", "Evaluator", "Influencer"],
|
|
"layoutMassUpdateDisabled": true,
|
|
"layoutListDisabled": true,
|
|
"layoutDetailDisabled": true,
|
|
"customizationRequiredDisabled": true,
|
|
"customizationIsSortedDisabled": true,
|
|
"customizationAuditedDisabled": true,
|
|
"customizationReadOnlyDisabled": true,
|
|
"where": {
|
|
"=": {
|
|
"leftJoins": ["opportunities"],
|
|
"sql": "opportunitiesMiddle.role = {value}",
|
|
"distinct": true
|
|
},
|
|
"<>": "contact.id NOT IN (SELECT contact_id FROM contact_opportunity WHERE deleted = 0 AND role = {value})",
|
|
"IN": {
|
|
"leftJoins": ["opportunities"],
|
|
"sql": "opportunitiesMiddle.role IN {value}",
|
|
"distinct": true
|
|
},
|
|
"NOT IN": "contact.id NOT IN (SELECT contact_id FROM contact_opportunity WHERE deleted = 0 AND role IN {value})",
|
|
"LIKE": {
|
|
"leftJoins": ["opportunities"],
|
|
"sql": "opportunitiesMiddle.role LIKE {value}",
|
|
"distinct": true
|
|
},
|
|
"IS NULL": {
|
|
"leftJoins": ["opportunities"],
|
|
"sql": "opportunitiesMiddle.role IS NULL",
|
|
"distinct": true
|
|
},
|
|
"IS NOT NULL": "contact.id NOT IN (SELECT contact_id FROM contact_opportunity WHERE deleted = 0 AND role IS NULL)"
|
|
},
|
|
"view": "crm:views/contact/fields/opportunity-role"
|
|
},
|
|
"acceptanceStatus": {
|
|
"type": "varchar",
|
|
"notStorable": true,
|
|
"exportDisabled": true,
|
|
"disabled": true
|
|
},
|
|
"acceptanceStatusMeetings": {
|
|
"type": "enum",
|
|
"notStorable": true,
|
|
"layoutListDisabled": true,
|
|
"layoutDetailDisabled": true,
|
|
"layoutMassUpdateDisabled": true,
|
|
"exportDisabled": true,
|
|
"view": "crm:views/lead/fields/acceptance-status",
|
|
"link": "meetings",
|
|
"column": "status"
|
|
},
|
|
"acceptanceStatusCalls": {
|
|
"type": "enum",
|
|
"notStorable": true,
|
|
"layoutListDisabled": true,
|
|
"layoutDetailDisabled": true,
|
|
"layoutMassUpdateDisabled": true,
|
|
"exportDisabled": true,
|
|
"view": "crm:views/lead/fields/acceptance-status",
|
|
"link": "calls",
|
|
"column": "status"
|
|
},
|
|
"campaign": {
|
|
"type": "link",
|
|
"layoutListDisabled": true
|
|
},
|
|
"createdAt": {
|
|
"type": "datetime",
|
|
"readOnly": true
|
|
},
|
|
"modifiedAt": {
|
|
"type": "datetime",
|
|
"readOnly": true
|
|
},
|
|
"createdBy": {
|
|
"type": "link",
|
|
"readOnly": true,
|
|
"view": "views/fields/user"
|
|
},
|
|
"modifiedBy": {
|
|
"type": "link",
|
|
"readOnly": true,
|
|
"view": "views/fields/user"
|
|
},
|
|
"assignedUser": {
|
|
"type": "link",
|
|
"view": "views/fields/assigned-user"
|
|
},
|
|
"teams": {
|
|
"type": "linkMultiple",
|
|
"view": "views/fields/teams"
|
|
},
|
|
"targetLists": {
|
|
"type": "linkMultiple",
|
|
"layoutDetailDisabled": true,
|
|
"layoutListDisabled": true,
|
|
"layoutMassUpdateDisabled": true,
|
|
"importDisabled": true,
|
|
"noLoad": true
|
|
},
|
|
"targetList": {
|
|
"type": "link",
|
|
"notStorable": true,
|
|
"layoutDetailDisabled": true,
|
|
"layoutListDisabled": true,
|
|
"layoutMassUpdateDisabled": true,
|
|
"layoutFiltersDisabled": true,
|
|
"exportDisabled": true,
|
|
"entity": "TargetList"
|
|
},
|
|
"portalUser": {
|
|
"type": "link",
|
|
"layoutMassUpdateDisabled": true,
|
|
"layoutListDisabled": true,
|
|
"layoutDetailDisabled": true,
|
|
"readOnly": true,
|
|
"notStorable": true,
|
|
"view": "views/fields/link-one"
|
|
},
|
|
"originalLead": {
|
|
"type": "link",
|
|
"layoutMassUpdateDisabled": true,
|
|
"layoutListDisabled": true,
|
|
"readOnly": true,
|
|
"view": "views/fields/link-one"
|
|
},
|
|
"targetListIsOptedOut": {
|
|
"type": "bool",
|
|
"notStorable": true,
|
|
"readOnly": true,
|
|
"disabled": true
|
|
}
|
|
},
|
|
"links": {
|
|
"createdBy": {
|
|
"type": "belongsTo",
|
|
"entity": "User"
|
|
},
|
|
"modifiedBy": {
|
|
"type": "belongsTo",
|
|
"entity": "User"
|
|
},
|
|
"assignedUser": {
|
|
"type": "belongsTo",
|
|
"entity": "User"
|
|
},
|
|
"teams": {
|
|
"type": "hasMany",
|
|
"entity": "Team",
|
|
"relationName": "entityTeam",
|
|
"layoutRelationshipsDisabled": true
|
|
},
|
|
"account": {
|
|
"type": "belongsTo",
|
|
"entity": "Account"
|
|
},
|
|
"accounts": {
|
|
"type": "hasMany",
|
|
"entity": "Account",
|
|
"foreign": "contacts",
|
|
"additionalColumns": {
|
|
"role": {
|
|
"type": "varchar",
|
|
"len": 100
|
|
},
|
|
"isInactive": {
|
|
"type": "bool",
|
|
"default": false
|
|
}
|
|
},
|
|
"additionalAttributeList": ["columns"],
|
|
"layoutRelationshipsDisabled": true
|
|
},
|
|
"opportunities": {
|
|
"type": "hasMany",
|
|
"entity": "Opportunity",
|
|
"foreign": "contacts"
|
|
},
|
|
"casesPrimary": {
|
|
"type": "hasMany",
|
|
"entity": "Case",
|
|
"foreign": "contact",
|
|
"layoutRelationshipsDisabled": true
|
|
},
|
|
"cases": {
|
|
"type": "hasMany",
|
|
"entity": "Case",
|
|
"foreign": "contacts"
|
|
},
|
|
"meetings": {
|
|
"type": "hasMany",
|
|
"entity": "Meeting",
|
|
"foreign": "contacts",
|
|
"layoutRelationshipsDisabled": true,
|
|
"audited": true
|
|
},
|
|
"calls": {
|
|
"type": "hasMany",
|
|
"entity": "Call",
|
|
"foreign": "contacts",
|
|
"layoutRelationshipsDisabled": true,
|
|
"audited": true
|
|
},
|
|
"tasks": {
|
|
"type": "hasChildren",
|
|
"entity": "Task",
|
|
"foreign": "parent",
|
|
"layoutRelationshipsDisabled": true,
|
|
"audited": true
|
|
},
|
|
"emails": {
|
|
"type": "hasChildren",
|
|
"entity": "Email",
|
|
"foreign": "parent",
|
|
"layoutRelationshipsDisabled": true
|
|
},
|
|
"campaign": {
|
|
"type": "belongsTo",
|
|
"entity": "Campaign",
|
|
"foreign": "contacts",
|
|
"noJoin": true
|
|
},
|
|
"campaignLogRecords": {
|
|
"type": "hasChildren",
|
|
"entity": "CampaignLogRecord",
|
|
"foreign": "parent"
|
|
},
|
|
"targetLists": {
|
|
"type": "hasMany",
|
|
"entity": "TargetList",
|
|
"foreign": "contacts"
|
|
},
|
|
"portalUser": {
|
|
"type": "hasOne",
|
|
"entity": "User",
|
|
"foreign": "contact"
|
|
},
|
|
"originalLead": {
|
|
"type": "hasOne",
|
|
"entity": "Lead",
|
|
"foreign": "createdContact"
|
|
},
|
|
"documents": {
|
|
"type": "hasMany",
|
|
"entity": "Document",
|
|
"foreign": "contacts",
|
|
"audited": true
|
|
},
|
|
"tasksPrimary": {
|
|
"type": "hasMany",
|
|
"entity": "Task",
|
|
"foreign": "contact",
|
|
"layoutRelationshipsDisabled": true
|
|
}
|
|
},
|
|
"collection": {
|
|
"orderBy": "createdAt",
|
|
"order": "desc",
|
|
"textFilterFields": ["name", "emailAddress"]
|
|
},
|
|
"indexes": {
|
|
"createdAt": {
|
|
"columns": ["createdAt", "deleted"]
|
|
},
|
|
"firstName": {
|
|
"columns": ["firstName", "deleted"]
|
|
},
|
|
"name": {
|
|
"columns": ["firstName", "lastName"]
|
|
},
|
|
"assignedUser": {
|
|
"columns": ["assignedUserId", "deleted"]
|
|
}
|
|
}
|
|
}
|