Announcement

Collapse
No announcement yet.

Default key names

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

  • Default key names

    Hi

    I am writing a guide for remote post handler i Drupal 8. The problem is that drupal only allow keys i lowercase and EspoCRM has keynames firstName and lastName. This is not allowed in drupal.
    Where can i find the json file or other settings for default keys in Contact module?

  • #2
    do you want entityDefs file?
    /application/Espo/Modules/Crm/Resources/metadata/entityDefs/Contact.json
    /custom/Espo/Custom/Resources/metadata/entityDefs/Contact.json

    Comment


    • #3
      Thanks. It look like what i want.

      I have to change the keys for firstName to firstname because Drupal 8 only allow lowercase keys in REST-services.
      I have tried renaming all the firstName key in /espocrm/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Contact.json and renaming first_name field to firstname in the contact table.
      But the result is that a new field with the key firstname is created. The old key is not changed.

      I have also tried the change the value in /espocrm/application/Espo/Core/Templates/Metadata/Person/entityDefs.json. But the result is the same. The key firstName is unchanged.

      When i make changes i hit rebuild afterwards.

      Is there any other settings that need to be changed?

      Greetings from Denmark

      Comment


      • #4
        I don't think it's a good idea
        there are some core files (one of them application/Espo/Core/Entities/Person.php) and views, related with firstName and lastName fields.
        If you change all of this files, it affects on leads and users as well.
        Better to create one more field for contact (any name), you can make this field notStorable as well. And in formula check? if this field is set, set firstName field

        Comment


        • #5
          Thank you for very good support, i think you are right.

          Greetings from Denmark

          Comment

          Working...
          X