let x = this._formContext.ui.formSelector.getCurrentItem().getId()this._formContext.ui.formSelector.items.forEach( function(f){ if(f.getId()!=x) f.setVisible(false); } );
Uncaught TypeError: f.setVisible is not a function
at eval (eval at Event_OnLoad (EventForm.js?ver=730334979:25207:35), <anonymous>:5:17)
at Xrm.XrmFormSelectorItems.forEach (global.ashx?ver=730334979:2939:13)
at eval (eval at Event_OnLoad (EventForm.js?ver=730334979:25207:35), <anonymous>:2:41)
at EventForm.Event_OnLoad (EventForm.js?ver=730334979:25207:35)
at eval (eval at RunHandlerInternal (ClientApiWrapper.aspx?ver=730334979:154:1), <anonymous>:1:34)
at RunHandlerInternal (ClientApiWrapper.aspx?ver=730334979:160:1)
at RunHandlers (ClientApiWrapper.aspx?ver=730334979:118:1)
at OnScriptTagLoaded (ClientApiWrapper.aspx?ver=730334979:275:1)
at ClientApiWrapper.aspx?ver=730334979:244:1
But the same piece of code works fine on Unified View. Need some insights on this.