SFU.soaMethod()
- Last UpdatedMar 12, 2021
- 1 minute read
Use soaMethod() method to call the SOA method.
Syntax
SFU.soaMethod("TitleName", "TitleName.ClassName", "MethodName", [Parameters], true);
Parameters
|
Parameter |
Description |
|
TitleName |
Name of the Assembly. |
|
ClassName |
Name of the Class. |
|
MethodName |
Name of the Method. |
|
Parameters |
Parameters. Use [ ] if there are no parameters. |
|
true/false |
Use true to show error an alert message in case of any exception. Otherwise, use false. |
Return Value
This method returns an object.
Example
// Call the SOA method to get the age of the employee.
var empName=control.findById("T1").value;
var empAge=control.findById("N1").value;
var empSal=control.findById("N2").value;
var empGender=control.findById("T2").value;
if(empName !== '')
{
var empDetails= SFU.soaMethod("EmpDetails", "EmployeeDetails.Employee", "GetEmployeeDetailsByName", ['"+empName+"'], true);
return empDetails.Age;
}
else
{
return currentValue;
}
Note: You must parse the parameters to match the SOA method parameter types.