Parsing the data into custom view file for entity

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • The50
    Member
    • Nov 2017
    • 39

    Parsing the data into custom view file for entity

    Hello, I am trying to change the view files for entity "Task" and I have a problem with parsing the data into that view. I edited the /custom/Espo/Custom/Resources/metadata/clientDefs/Task.json

    file with:

    "recordViews": {
    "list": "custom:views/task/record/list",
    "detail": "custom:views/task/record/detail",
    "edit": "custom:views/task/record/edit"
    }

    I created whose files, but now I can't find which view file is default for the record? I want to get all the data just like default files do and then edit some things, right now I get empty screen, but my specified files is loaded fine ( I see output from console.log if I put it into list.js file).

    P.S. I followed the documentation here https://github.com/espocrm/documenta...ustom-views.md

    I guess the problem may be with this define function:
    What file should I define to get that default functionality?

    Espo.define('custom:views/task/record/list', 'views/task/record/list', function (Dep) { });
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello
    application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json
    here you can find current views.
    extend your view has to extend this view, or base (from client/src/views/record)

    Espo.define('custom:views/task/record/list', 'crm:views/task/record/list', function (Dep) { });

    or

    Espo.define('custom:views/task/record/list', 'views/record/list', function (Dep) { });

    Comment

    • The50
      Member
      • Nov 2017
      • 39

      #3
      Originally posted by tanya
      Hello
      application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json
      here you can find current views.
      extend your view has to extend this view, or base (from client/src/views/record)

      Espo.define('custom:views/task/record/list', 'crm:views/task/record/list', function (Dep) { });

      or

      Espo.define('custom:views/task/record/list', 'views/record/list', function (Dep) { });
      Thank you it works. Now I have a problem overriding the templates. I need to change the image-preview.tpl but after I upload the whole res/templates folder into custom folder, it still loads all the templates from the original folder. How do I change this?

      Comment

      • tanya
        Senior Member
        • Jun 2014
        • 4308

        #4
        for new question create a new new topic and clearly describe the problem

        Comment

        Working...