Custom class stop working?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • homeempire
    Senior Member
    • Sep 2014
    • 181

    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?
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    Hi

    Yes. Seems to be a bug. Will fix it in the next hotfix release.
    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
      To fix it: modify file client/src/loader.js
      Change

      if (modulePart == 'Custom') {

      to

      if (modulePart == 'custom') {
      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

      • homeempire
        Senior Member
        • Sep 2014
        • 181

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

        Comment

        • homeempire
          Senior Member
          • Sep 2014
          • 181

          #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

          • yuri
            Member
            • Mar 2014
            • 8440

            #6
            Maybe you have a syntax error in your json.
            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...