Updates and changes in application

Collapse
This topic is closed.
X
This is a sticky topic.
X
X
 
  • Time
  • Show
Clear All
new posts
  • yuri
    Member
    • Mar 2014
    • 8440

    Updates and changes in application

    Announcements of changes and updates in the application.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    5.5.0 version


    User type field

    We add Type field that will be used Instead of current multiple fields 'isAdmin', 'isPortalUser' etc. Old fields will be also supported for a while. User types: 'regular', 'admin', 'portal', 'super-admin', 'system', 'api'.


    Sorting parameters

    We introduce 'orderBy' and 'order' for sorting lists. These parameters can be passed as get paramers in API requesrs, used in frontend collections and defined in entityDefs for default sorting. Previous parameres 'sortBy' and 'asc' will be supported for a while.

    Example:

    orderBy: 'createdAt',
    order: 'desc'.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8440

      #3
      5.6.9 version

      ORM: Parameter returnSthCollection

      Can be used with find and findRelated methods. With this param provided, they will return a collection that doesn't allocate memory for all result data.

      https://github.com/espocrm/documentation/blob/master/docs/development/orm.md#returnsthcollection


      PHP Code:
      
      $collection = $entityManager->getRepository('Email')->limit(0, 10000)->find(['returnSthCollection' => true]);
      foreach ($collection as $entity) {
          // memory is allocated for each item, when collection is iterated
      } 
      
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • yuri
        Member
        • Mar 2014
        • 8440

        #4
        5.6.0 version

        View: wait method now accepts promises


        wait method holds rendering of the view until conditions met.

        Code:
            setup: function () {
                    this.wait(
                        this.model.fetch()
                    );
            },
        Code:
            setup: function () {
                    this.wait(
                        this.getModelFactory().create('Case')
                        .then(function (model) {
                            model.id = this.model.id
                            return model.fetch();
                        }.bind(this))
                        .then(function (model) {
                            console.log(model);
                        })
                    );
            },
        Code:
            setup: function () {
                    this.wait(
                        Promise.all([
                            this.model.fetch(),
                            this.model.collection.fetch()
                        ])
                    );
            },
        Last edited by yuri; 08-06-2019, 06:29 AM.
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • yuri
          Member
          • Mar 2014
          • 8440

          #5
          In 7.1 version it's not possible to change the ID of the entity from the formula.

          Possible workarounds:
          • Before-Save hook
          • Custom formula function
          If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

          Comment

          Working...