Service Offerings are not loading in Service Point and giving pop-up error on invoking onload function.
search cancel

Service Offerings are not loading in Service Point and giving pop-up error on invoking onload function.

book

Article ID: 371948

calendar_today

Updated On:

Products

CA Service Catalog CA Service Desk Manager CA Service Management - Service Desk Manager

Issue/Introduction

Unable to load a few Catalog offerings in Service Point and getting a pop-up "Error while invoking onload function: ca.fd.js.populate_req_name_for_departure()"

Environment

CA Service Catalog  17.x

Cause

The issue is because of directly accessing/interacting with DOM elements instead of using the Service Catalog Form API.

Resolution

It is advised to use OOTB form designer APIs instead of DOM elements to mitigate loading issues and to substitute them with form designer APIs wherever appropriate.

For more information about Form designer API's. Please refer http://<<Servicecataloghostname>>:<<portnumber>>/usm/API/JS/symbols/Select.html

Additional Information

If your custom js function needs to define some Service Catalog object related variables, you would need to have

var _ = ca_fd.getContext();

at the beginning of the function body. For example, 

function to_loadl(form_actual){
   rstat =_.request.status;
//..............

}

should be changed to

function to_load(form_actual){

var _ = ca_fd.getContext();
rstat =_.request.status;
//..............

}

otherwise you will run into this onload error issue.

Note: The var _ = ca_fd.getContext(); code needs to be added on each function being called and using "_" functionality.