recordsPerPage and recordsPerPageSmall

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • czcpf
    Senior Member
    • Aug 2022
    • 160

    recordsPerPage and recordsPerPageSmall

    Is it possible to customize these two settings for a specific entity or just globally?

    For example,

    Suppose I have an entityA with one-to-many relationship to entityB, when viewing entityA I want the bottom panel showing entityB to display 50 recordsPerPage.

    Thank you,
  • item
    Active Community Member
    • Mar 2017
    • 1476

    #2
    Hi, Yes, globaly you can specify : in admin section in setting if not forget (sorry post on phone)
    If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

    Comment

    • esforim
      Active Community Member
      • Jan 2020
      • 2204

      #3
      It global. So the list will be base on setting.

      You have to do some "Custom" view I would say for anything else. E.g.

      Contact <> Asset 10 Records
      Account <> Asset 50 Records

      Perhaps other people did something but I dont recall any thread about this.

      Comment

      • rabii
        Active Community Member
        • Jun 2016
        • 1250

        #4
        Hey czcpf

        These settings can be set globally for all entities, however if you want a specific entity to have a different value of records to display you can still create a custom view for that, based on your example let us rename these entities as entityA (account) and entityB (contact), there is a relationship defined on entityA (account) clientDefs with a custom view as below:

        PHP Code:
        "relationshipPanels": {
              "contacts": {
                 "view": "custom:views/account/record/panels/contacts",
                 "orderBy": "name"
              }
        } 
        

        This is the custom view for contacts relationship panel on account:
        PHP Code:
        define('custom:views/account/record/panels/contacts', ['views/record/panels/relationship'], function (Dep) {
        
            return Dep.extend({
        
                recordsPerPage: 2,
        
            });
        }); 
        
        Now on the account the contacts relationship panel will display on two contact and (show more) link.

        I hope this is what you want to achieve.
        Rabii
        Web Dev

        Comment

        • czcpf
          Senior Member
          • Aug 2022
          • 160

          #5
          Hi rabii, this is exactly what I was looking for. Thank you!

          Comment


          • rabii
            rabii commented
            Editing a comment
            you are welcome mate
        Working...