An issue was noticed with recursive js calls in a form on setting the delivery address in multiple steps.
Environment
Release : 17.1
Component : CA SERVICE CATALOG
Cause
Steps to reproduce: -------------------------------- For example if we update City this calls the js script for refreshing and updating the property combo box and the property js script calls the building js script to be updated and so on. So if I change the property value all values below (building,floor,room,address) should be cleared.
If we have or js code like this. { LevInfoChange: function() { var sText=ca_fdGetSelectedOptionValues(ca_fd.formId,'kommun')[0]+"\n"+ca_fdGetSele ctedOptionValues(ca_fd.formId,'fastighet')[0]+", "+ca_fdGetSelectedOptionValues(ca_fd.formId,'byggnad')[0]+"\n"+ca_fdGetSelected OptionValues(ca_fd.formId,'plan')[0]+", "+ca_fdGetSelectedOptionValues(ca_fd.formId,'rum')[0]; ca_fdSetTextFieldValue(ca_fd.formId, 'adress', sText); }, BytKommun: function() { ca_fdFetchSelectData(ca_fd.formId,'fastighet'); ca_fd.js.BytFastighet(); }, BytFastighet: function() { ca_fdFetchSelectData(ca_fd.formId,'byggnad'); ca_fd.js.BytByggnad(); }, BytByggnad: function() { ca_fdFetchSelectData(ca_fd.formId,'plan'); ca_fd.js.BytPlan(); }, BytPlan: function() { ca_fdFetchSelectData(ca_fd.formId,'rum'); ca_fd.js.BytRum(); }, BytRum: function() { ca_fd.js.LevInfoChange(); } }
Then the form will not populate data to building,floor or room for some reason. The building data is not fetched when "City/Kommun" calls the "Property/Fastighet".
However, if we remove the recursive calls like in the below js it is fetched properly like in the first picture. { LevInfoChange: function() { var sText=ca_fdGetSelectedOptionValues(ca_fd.formId,'kommun')[0]+"\n"+ca_fdGetSelectedOptionValues(ca_fd.formId,'fastighet')[0]+","+ca_fdGetSelectedOptionValues(ca_fd.formId,'byggnad')[0]+"\n"+ca_fdGetSelectedOptionValues(ca_fd.formId,'plan')[0]+","+ca_fdGetSelectedOptionValues(ca_fd.formId,'rum')[0]; ca_fdSetTextFieldValue(ca_fd.formId, 'adress', sText); }, BytKommun: function() { ca_fdFetchSelectData(ca_fd.formId,'fastighet'); // ca_fd.js.BytFastighet(); }, BytFastighet: function() { ca_fdFetchSelectData(ca_fd.formId,'byggnad'); // ca_fd.js.BytByggnad(); }, BytByggnad: function() { ca_fdFetchSelectData(ca_fd.formId,'plan'); // ca_fd.js.BytPlan(); }, BytPlan: function() { ca_fdFetchSelectData(ca_fd.formId,'rum'); // ca_fd.js.BytRum(); }, BytRum: function() { ca_fd.js.LevInfoChange(); } }
However this is not a solution because this do not clear the data when changing a combobox higher up. For example if I change the property value only building is changed, the floor and room still have the old values.
Resolution
A defect has been raised for this issue i.e. DE54829
Open a case with Broadcom support to know the progress/solution on this defect.