How to make a custom (Report-)Filter unsed for view-list make default?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ctheuring
    Senior Member
    • Oct 2022
    • 138

    How to make a custom (Report-)Filter unsed for view-list make default?

    I've made some reports with entity report and report-filters to have common entity-filters for all users.
    By default, the filter ALL is the default filter. I want to change it to one of my custom-filters.
    I've tried different guidelines here, but none does the job:
    For example I extended the <entity>.json in Espo/custom/Resources/metadata/clientDef with
    Code:
     ...
    "defaultFilterData": {
    "name": "reportFilter64f1c2757df5e73f4",
    "style": "primary"
    },
    "selectDefaultFilters": {
    "filter": "reportFilter64f1c2757df5e73f4"
    },
    ...


    Christoph
  • victor
    Active Community Member
    • Aug 2022
    • 727

    #2
    ctheuring ,

    Detailed instructions: https://forum.espocrm.com/forum/feat...2689#post92689

    Comment

    • ctheuring
      Senior Member
      • Oct 2022
      • 138

      #3
      Hello victor,

      thanks - that was the right instrunction :-)
      Question: where can I find the ID of the default (filter-)reports of tasks? - to make one of them default?

      Christph

      Comment

      • victor
        Active Community Member
        • Aug 2022
        • 727

        #4
        If I understood your question correctly, the ID of the required Report Filter can be found directly in the address bar of the browser (having previously gone to Administration > Report Filters > Your_report_filter_name).
        Attached Files

        Comment

        • ctheuring
          Senior Member
          • Oct 2022
          • 138

          #5
          Hello victor,

          it's NOT about the ReportFilters I create as custom-filters, I searched for the IDs of the build-in-filters, for example in Tasks: completed, deferred, overdue, todays
          ... a grep didn't found a task.json anywhere in application/...

          Christoph

          Comment

          • ctheuring
            Senior Member
            • Oct 2022
            • 138

            #6
            I found it - .../Espo/Modules/CRM/Resources/metadata/clientDefs/Task.json (with regexxer search-tool).
            The name of the Filter is (simple) completed, deferred, overdue or todays .
            So I can append (the same code) to .../Custom/Resources/metadata/clientDefs/Task.json as for the other entities.
            Code:
            ----------------cut------------------------
            "dynamicLogic": ....​
            "__comment": "20231127 ct add",
            "defaultFilterData": {
            "primary": "overdue"
            },
            "__comment": "end add",​
            "kanbanViewMode"​ ...
            ---------------end cut----------------
            Some more learned about espoCRM.
            Thanks for your help
            Christoph

            Comment

            Working...