AddPhone
This call adds phone numbers to existing employee records in PureSafety. Phone numbers added through this method are created as "Work" type phone numbers. You can indicate if the new phone number should become the primary phone number.
Information | |
---|---|
Syntax |
AddPhone(UserLoginWebServiceEntity userLoginWebServiceEntity, string employeeCode, string phoneNumber, string phoneCountry, string extension, bool isPrimary) |
Fields | |
Required Fields |
|
Optional Fields |
Note: NULL or False can be used to
indicate that a value is not provided.
|
Response |
|
Sample Code - C#
public void Sample()
{
UserLoginWebServiceEntity userLoginWebServiceEntity = new UserLoginWebServiceEntity();
userLoginWebServiceEntity.WebServiceLoginName = "username";
userLoginWebServiceEntity.WebServiceLoginPassword = "password";
string employeeCode = "JB01";
string phoneNumber = "(555)555-5555";
string phoneCountry = "USA";
string extension = "123";
bool isPrimary = true;
// Invoke the call
try
{
EmployeeWebServiceContractClient employeeWebService = new EmployeeWebServiceContractClient();
employeeWebService.AddPhone(userLoginWebServiceEntity, employeeCode, phoneNumber, phoneCountry, extension, isPrimary);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
Sample Code - Java
public void JavaSample()
{
UserLoginWebServiceEntity userLoginWebServiceEntity =
new UserLoginWebServiceEntity("username","password");
String employeeCode = "JB01";
String phoneNumber = "(555)555-5555";
String phoneCountry = "USA";
String extension = "123";
boolean isPrimary = true;
try { //Invoke the call
EmployeeWebServiceLocator locator = new EmployeeWebServiceLocator();
EmployeeWebServiceContract employeeWebService = locator.getbasicEndpoint();
employeeWebService.addPhone(
userLoginWebServiceEntity,
employeeCode,
phoneNumber,
phoneCountry,
extension,
isPrimary
);
}
catch (Exception e) {
e.printStackTrace();
}
}