AnsweredAssumed Answered

TypeError: Cannot read property 'css_class' of undefined  in Accounts Module

Question asked by Varun Nath A V on Sep 10, 2015
I am using SugarCRM version 7.6.1.0. I have added a fieldset for address in Accounts module Record View. This fieldset contains a County field and a State field. I have added a dependency between State and County fields using visibility grid. On loading the Accounts record view, in browser console I am getting error messages as shown below

"TypeError: d is undefined

if (d[prop] && d[prop].indexOf(css_class) != -1) {"

I performed an investigation and found out the following details

The issue is due to visibility grid inside a fieldset

The Visibility action in "src/include/Expressions/Actions/VisibilityAction.php" calls the method "removeClass" in "crm/src/sidecar/lib/sugarlogic/sidecarExpressionContext.js". This function tries to fetch the Field Meta from the view. As the visibility grid is defined inside fieldset its unable to find the field meta from the meta panels. Due to this the field definition get undefined and hence displaying the JS error. Is this a known SugarCRM bug. Does anyone have a workaround for this?

Outcomes