Below is the code for calling business service through script:
if(MethodName == "YourMethod")
{
var sContactId = this.BusComp().GetFieldValue("Customer Number");
var svc = TheApplication().GetService("YourCustomBusinessService");
var inPuts = TheApplication().NewPropertySet();
var outPuts = TheApplication().NewPropertySet();
inPuts.SetProperty("Contact Id", sContactId);
svc.InvokeMethod("BusinessServiceMethod", inPuts, outPuts);
return (CancelOperation);
}
if(MethodName == "YourMethod")
{
var sContactId = this.BusComp().GetFieldValue("Customer Number");
var svc = TheApplication().GetService("YourCustomBusinessService");
var inPuts = TheApplication().NewPropertySet();
var outPuts = TheApplication().NewPropertySet();
inPuts.SetProperty("Contact Id", sContactId);
svc.InvokeMethod("BusinessServiceMethod", inPuts, outPuts);
return (CancelOperation);
}
Comments
Post a Comment