Announcement

Collapse
No announcement yet.

New field

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

  • New field

    Hi again,

    I also need to create a field named KDI, a float and i need to make a relation with teams, each team must have a KDI.
    Thats the easyest way of doing this?

    Thanks in advance

  • #2
    Hi,
    custom/Espo/Custom/Resources/metadata/entityDefs/Team.json
    Code:
    {
        "fields": {
            "kdi": {
                "type": "float",
                "required":true
            }
        }
    }
    custom/Espo/Custom/Resources/layouts/Team/detail.json
    Code:
    [
        {
            "rows": [
                [
                    {"name": "name"},
                    {"name": "kdi"}
                ],
                [
                    {"name": "roles"},
                    {"name": "positionList"}
                ]
            ]
        }
    ]
    And translate the label in lang file

    Comment


    • #3
      Thanks for your reply, but i got a "Bad server response"
      And this in the log:

      [2016-10-13 18:05:39] Espo.ERROR: API [GET]:/App/user, Params:Array ( ) , InputData: - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'team.kdi' in 'field list' [] []
      [2016-10-13 18:05:39] Espo.ERROR: Display Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'team.kdi' in 'field list', Code: 42S22 URL: /api/v1/App/user [] []

      I tried to remove the files but i could not get the server to work again. How do i delete the cache from outside the app?
      Last edited by bombix; 10-13-2016, 11:05 PM.

      Comment


      • #4
        Try /data/cache and run rebuild.php
        ------------------
        Robert Laussegger
        iscon group
        http://www.iscongroup.net
        mailto://info@iscongroup.net

        Comment


        • #5
          I thanks for the ansker, but in data/cache/aplication there isnt a rebuild.php.

          What im i missing to add the field?

          Comment


          • #6
            I found the clean_cache.php the server is back online, but how can i had the field?

            Comment


            • #7
              Ok made it yeaaaaaaaaaaaaaaaa

              Comment


              • #8
                in the future... if you make any changes in files (entityDefs, langs, layouts etc), run Rebuild and Clear Cache in Administration panel

                Comment


                • #9
                  Hi, again.
                  I need to create something that define timeframes, like year 2015 reports to period X to Y. Each team KPI as a diferent value associated with each time frame.
                  I was wondering whats the best way to create this struture. Maybe:
                  Create an entity named time frame?
                  How do i make each team have diferent KPI?

                  Thanks in advance

                  Comment


                  • #10
                    I propose you to install developer espocrm for test. Create field in available entities with Entity Manager, and watch files are created and what these files contain. If you want to develop something, try to find something looks like you want and use existing code as example.
                    float field (as well as int) has "min" and "max" optional params.

                    Comment


                    • #11
                      The problem is that there alot of files created in alot of diferent locations.
                      I created an entity name "year", i now whant to make a relation between teams and "ano" but when i try to create a relation team doesnt show in te menu.
                      What im i missing?

                      Comment

                      Working...
                      X