Announcement

Collapse
No announcement yet.

Make title mandatory for contact linked to account

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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:	171
Size:	12.8 KB
ID:	99120

  • #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.

    Comment


    • #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


      • #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.

        Comment

        Working...
        X