Create new record in Business Service, provide appropriate name and project.
Create new record in Business Service Method, provide appropriate method name.
Expand Business Service Method and create new records in Business Service Method Arguments and select Type as Input and Output.
Right Click on Business Service name and click on Edit Server Scripts.
In Service_PreInvokeMethod write your script.
function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
if(MethodName == "SET")
{
var IP = Inputs.GetProperty("in"); //Input Property name defined in Business Service Method Arguments
var rep = /(-)/g;
IP = IP.replace(rep , "");
Outputs.SetProperty("out", IP); //Output Property name defined in Business Service Method Arguments
return (CancelOperation);
}
return (ContinueOperation);
}
Save, Compile and Test.
Create new record in Business Service Method, provide appropriate method name.
Expand Business Service Method and create new records in Business Service Method Arguments and select Type as Input and Output.
Right Click on Business Service name and click on Edit Server Scripts.
In Service_PreInvokeMethod write your script.
function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
if(MethodName == "SET")
{
var IP = Inputs.GetProperty("in"); //Input Property name defined in Business Service Method Arguments
var rep = /(-)/g;
IP = IP.replace(rep , "");
Outputs.SetProperty("out", IP); //Output Property name defined in Business Service Method Arguments
return (CancelOperation);
}
return (ContinueOperation);
}
Save, Compile and Test.
Comments
Post a Comment