Make title mandatory for contact linked to account

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Maarten
    Member
    • Jun 2020
    • 69

    Make title mandatory for contact linked to account

    Hi,

    When I link an account to a contact, it gives the option to add a title.
    Is there a way to make the title required?

    The field doesn't seem to have any options
    Click image for larger version

Name:	image.png
Views:	179
Size:	12.8 KB
ID:	99120
  • yuri
    Member
    • Mar 2014
    • 8621

    #2
    Hi Maarten,

    It's not possible. The 'contactRole' field is not Account side. It is not that field.

    Consider a custom backend validation or an API Before Save script.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • Maarten
      Member
      • Jun 2020
      • 69

      #3
      I have a related question. When we create a new contact, and add next to the account a title (function title), then it's not stored by espocrm.

      This is the payload:
      Code:
      {
          "status": "New",
          "whatsapp": "",
          "contractType": "Consultant",
          "teamsIds": [
              "64b68137887f3032d"
          ],
          "teamsNames": {
              "64b68137887f3032d": "Coordination team"
          },
          "salutationName": null,
          "firstName": "test",
          "lastName": "test",
          "name": "test test",
          "emailAddressData": [],
          "emailAddress": null,
          "emailAddressIsOptedOut": null,
          "emailAddressIsInvalid": null,
          "phoneNumberData": [],
          "phoneNumber": null,
          "phoneNumberIsOptedOut": null,
          "phoneNumberIsInvalid": null,
          "language": [],
          "accountsIds": [
              "61166f5cc1273c993"
          ],
          "accountsNames": {
              "61166f5cc1273c993": "test"
          },
          "accountsColumns": {
              "61166f5cc1273c993": {
                  "role": "test",
                  "isInactive": false
              }
          },
          "accountId": "61166f5cc1273c993",
          "accountName": "test",
          "title": "test",
          "accountIsInactive": false,
          "countryName": null,
          "countryId": null,
          "linkedIn": null,
          "description": null,
          "travelsIds": [],
          "travelsNames": {}
      }​
      This is the response:

      Code:
      {
      "id": "654793839f9a24e43",
      "name": "test test",
      "deleted": false,
      "salutationName": null,
      "firstName": "test",
      "lastName": "test",
      "title": null,
      "description": null,
      "emailAddress": null,
      "phoneNumber": null,
      "doNotCall": false,
      "accountIsInactive": false,
      "createdAt": "2023-11-05 13:07:15",
      "modifiedAt": "2023-11-05 13:07:15",
      "hasPortalUser": false,
      "targetListIsOptedOut": false,
      "linkedIn": null,
      "language": [],
      "roleDescription": "",
      "linkedInLink": "<a href=\"\" target=\"_blank\">Click here<\/a>",
      "status": "New",
      "trainingAmount": 0,
      "whatsapp": "",
      "contractType": "Consultant",
      "isNLRCManager": false,
      "emailAddressIsOptedOut": null,
      "emailAddressIsInvalid": null,
      "phoneNumberIsOptedOut": null,
      "phoneNumberIsInvalid": null,
      "emailAddressData": [],
      "phoneNumberData": [],
      "accountId": "61166f5cc1273c993",
      "accountName": "test",
      "accountsIds": [
      "61166f5cc1273c993"
      ],
      "accountsNames": {
      "61166f5cc1273c993": "test"
      },
      "accountsColumns": {
      "61166f5cc1273c993": {
      "role": null,
      "isInactive": false
      }
      },
      "createdById": "614da7c0e68dba891",
      "teamsIds": [
      "64b68137887f3032d"
      ],
      "teamsNames": {
      "64b68137887f3032d": "Coordination team"
      }
      }​
      After the contact is created, when we update the Title field for the contact's account, then it's saved.

      Any idea why this is?

      Comment

      • yuri
        Member
        • Mar 2014
        • 8621

        #4
        Maybe some customization (formula, workflow) interferes. Does it work when you create a related contact with an account role through the UI? If yes, try to replicate the same request. If no, try to figure out with your customizations.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        Working...