Announcement

Collapse
No announcement yet.

Custom class stop working?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom class stop working?

    After upgrade to 3.5.1 custom class stop working.

    Eg. I change in clientDefts/Account.json code to:

    Code:
    {
       "controller": "controllers/record",
       "views":{
          "detail":"Custom:Account.Detail"
       },
       
       "relationshipPanels":{
          "contacts":{
             "actions":[
    
             ],
             "layout":"listForAccount"
          },
          "campaignLogRecords": {
            "rowActionsView": "Record.RowActions.Empty",
            "select": false,
            "create": false
          }
       },
       "boolFilterList": ["onlyMy"],
       "additionalLayouts": {
          "detailConvert": {
             "type": "detail"
          }
       }
    }

    and in client/custom/src/views/account/detail.js I have:

    Code:
    Espo.define('Custom:Account.Detail', 'Views.Detail', function (Dep) {
    
        return Dep.extend({
        
            relatedAttributeMap: {
                'contacts': {
                    'billingAddressCity': 'addressCity',
                    'billingAddressStreet': 'addressStreet',
                    'billingAddressPostalCode': 'addressPostalCode',
                    'billingAddressState': 'addressState',
                    'billingAddressCountry': 'addressCountry',
                    'id': 'accountId',
                    'name': 'accountName'
                },
            },
            
            
            
        });
    });

    what's wrong?

  • #2
    Hi

    Yes. Seems to be a bug. Will fix it in the next hotfix release.

    Comment


    • #3
      To fix it: modify file client/src/loader.js
      Change

      if (modulePart == 'Custom') {

      to

      if (modulePart == 'custom') {

      Comment


      • #4
        Ok, thank You. I will wait to next hotfix. I hope it have also a mail fix (errors with attachment from Mac).

        Comment


        • #5
          I have my custom clientDefs in e.g : custom/Espo/Custom/Resources/metadata/clientDefs/Account.json but espo don't use this - i need to modify files in aplication folder.

          Comment


          • #6
            Maybe you have a syntax error in your json.

            Comment

            Working...
            X