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()"
CA Service Catalog 17.x
The issue is because of directly accessing/interacting with DOM elements instead of using the Service Catalog Form API.
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
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.