wc.service.getServiceById (serviceId)
The wc.service.getServiceById helper function is for getting a handle
on the service object that was declared by using the wc.service.declare function.
Once the service object is obtained, you can update any information in the service object such as
URL, formId, or others. If the service is not declared, the function returns
undefined
. This function is helpful when you find a service and update its
parameters before you invoke it.
Example
wc.service.getServiceById("AjaxAddOrderItem ").formId = "OrderItemForm";
Parameters
- serviceId
- (String) The service ID.