How to add entry point to an application service through background scripts


Description

As per the below doc link

https://docs.servicenow.com/bundle/orlando-application-development/page/app-store/dev_portal/API_reference/BusinessServiceManager/concept/BusinessServiceManagerAPI.html#ariaid-title2


we have a method of adding CI to an application service


This can be re-used for adding an entry point to an application service

we can use the addCI method to add the entry point to an application service

new SNC.BusinessServiceManager().addCISync(<service_id>, null, <target_ci_id>));

the string source id will be null


Note that target_ci_id refers to the sys id of the target ci and not the sys id of the endpoint.
Usage example:
var manager = new SNC.BusinessServiceManager();
var serviceId = 'some_service_sys_id';
var targetCiId = 'target_sys_id';
manager.addCISync(serviceId, null, targetCiId);