10 Replies · Latest reply on Jan 3, 2018 12:15 PM by chanikya

    How to stop Infinite loop onLoad with view list?

      I have create new client script to switch view base on title field on sys_user table. But it seem switch infinite loop view list not specific view base on condition

      How can I stop infinite load

      below my script:

      function onLoad() {

      var employee = g_form.getReference('u_employee_name');

      if(employee.title == 'Employee' || employee.title == 'Supervisor'){

      switchView('section','u_incident_log','basic_view');

      }

      else if(employee.title == 'Manager') {

      switchView('section','u_incident_log','Self_service');

      }

      else if(employee.title == 'Site Mgr' || employee.title == 'Vice President') {

      switchView('section','u_incident_log','site_mgr_vp');

      }

      else{

      switchView('section','u_incident_log','');

      }

      }