OnLoad not running part of the script

book

Article ID: 106294

calendar_today

Updated On:

Products

CA Service Catalog CA Service Management - Asset Portfolio Management CA Service Management - Service Desk Manager

Issue/Introduction

A script that runs OnLoad is only running in partial. This same script works in 14.1 works completely, when not running OnLoad the script runs completely. Refer to screenshots. The folder offering that contains this form will be uploaded as well.

Environment

Release:
Component: USVCT

Resolution

This may be a timing issue.
While it may not always solve the problem this can sometimes be solved by setting the scope and then switching to that scope.
For example:

onLoadFormCommon : function(){ 
departmentcostcenterhidden = false; 
var scope = ca_fd.fdScope; 
var formid = ca_fd.formId; 
setTimeout( function(){ 
ca_fd.switchFdScope(scope,formid); 
ca_fd.js.requestedForType(); 
ca_fd.js.chargeAreaType(); 
},1000); 
},