Can't make a new Entity in a Module. No Table in Database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Irenicus
    Junior Member
    • Mar 2026
    • 3

    #1

    Can't make a new Entity in a Module. No Table in Database

    I use EspoCRM 9.3.3

    I tried to build a new Modul and i can not make a new Entity named: "Seminar"
    It apears in the entity-manager, but ist no selectable. I can't see it in the Layout manager.
    There is no Database-Entry.
    I have given the rights to the Role of my User.
    I have rebuild and cleared cache.

    I have made the following paths:

    ../data/espocrm/custom/Espo/Modules/WB

    Module.php
    Code:
    <?php
    
    namespace Espo\Modules\WB;
    
    use Espo\Core\Module as BaseModule;
    
    class Module extends BaseModule
    {
        /**
         * Diese Funktion wird beim Laden des Moduls aufgerufen.
         * Hier können zusätzliche Initialisierungen erfolgen.
         */
        public function init()
        {
            // Optional: hier eigene Logik, Hooks oder Events hinzufügen
        }
    }
    
    ?>
    ../data/espocrm/custom/Espo/Modules/WB/Resources/metadata/entityDefs/Seminar.json
    Code:
    {
      "type": "Base",
      "fields": {
        "name": {
          "type": "varchar",
          "required": true
         },
        "thema": {
          "type": "varchar",
          "required": true
        },
        "beschreibung": {
          "type": "text"
        },
        "startDatum": {
          "type": "datetime",
          "required": true
        },
          "endDatum": {
          "type": "datetime"
        },
        "dozent": {
          "type": "varchar"
        }
      },
      "collection": {
        "orderBy": "startDatum",
        "order": "asc"
      }
    }
    .../data/espocrm/custom/Espo/Modules/WB/Resources/metadata/clientDefs/Seminar.json
    Code:
    {
      "controller": "controllers/record"
    }
    /data/espocrm/custom/Espo/Modules/WB/Resources/metadata/layouts/Seminar.json
    Code:
    {
      "panels": [
        {
          "name": "main",
          "label": "LBL_PANEL_DEFAULT",
          "fields": [
            "name",
            "thema",
            "beschreibung",
            "startDatum",
            "endDatum",
            "dozent"
          ]
        }
      ]
    }​
    .../data/espocrm/custom/Espo/Modules/WB/Resources/metadata/layouts/SeminarList.json
    Code:
    {
      "panels": [
        {
          "name": "main",
          "label": "LBL_PANEL_DEFAULT",
          "fields": [
            "name",
            "thema",
            "startDatum",
            "endDatum",
            "dozent"
          ]
        }
      ]
    }​​
    .../data/espocrm/custom/Espo/Modules/WB/Resources/metadata/scopes/Seminar.json
    Code:
    {
      "entity": true,
      "object": true,
      "module": "WB",
      "type": "Base",
      "stream": true,
      "tab": true,
      "acl": true
    }
    .../data/espocrm/custom/Espo/Modules/WB/Resources/i18n/de_D​E/
    Code:
    {
      "labels": {
        "plural": "Seminare",
        "singular": "Seminar"
      },
      "fields": {
        "name": "Titel",
        "thema": "Thema",
        "beschreibung": "Beschreibung",
        "startDatum": "Startdatum",
        "endDatum": "Enddatum",
        "dozent": "Dozent"
      }
    }
    Last edited by Irenicus; 03-21-2026, 02:52 PM.
  • Irenicus
    Junior Member
    • Mar 2026
    • 3

    #2
    Can at least somebody say something. and if it only is something like: "this is stupid"... i tried to find tutorials, everything i tried seemed to be outdated. I'm really struggling for weeks now, And it's only one simple entity. I want to build a small module. I could do this with the intern entity-creator. But that's not what i want. i need to install this on several servers.

    I tried to build an extension with the template... didn't work either. Same problem. extension is installed, Entity isn't there.

    Comment

    • yuri
      EspoCRM product developer
      • Mar 2014
      • 9777

      #3
      Your "Module" class is something completely random, might be from an LLM output rather than a tutorial.

      This tutorial is not outdated: https://docs.espocrm.com/development...m-entity-type/

      You can also build in the admin UI and export the result into an installable extension https://docs.espocrm.com/administrat...g-to-extension.

      Comment

      • Irenicus
        Junior Member
        • Mar 2026
        • 3

        #4
        Thx for the answer.

        Comment

        Working...