Announcement

Collapse
No announcement yet.

Updates and changes in application

Collapse
This topic is closed.
X
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Updates and changes in application

    Announcements of changes and updates in the application.

  • #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'.

    Comment


    • #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(010000)->find(['returnSthCollection' => true]);
      foreach (
      $collection as $entity) {
          
      // memory is allocated for each item, when collection is iterated

      Comment


      • #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.

        Comment


        • #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

          Comment

          Working...
          X