Thursday, February 9, 2012

Axosoft OnTime get a list of all contact with company name, email, phone using Axosoft OnTime SDK and Powershell


clear

$securityToken="your guid here"

$customerUrl="http://[your url here]/ontimesdk/customerservice.asmx"

$onTimeCustomer = New-WebServiceProxy $customerUrl -Namespace customers

$customerHandler = New-Object customers.CustomerHandler

$dataset2 = $customerHandler.GetAllCustomerContacts($securityToken)

foreach ($contactRow in $dataset2.Tables[0].Rows)
{
if ($contactRow.CanLogin)
{
$contactRow.CompanyName
" " + $contactRow.FirstName + " " + $contactRow.LastName
" " + $contactRow.Email + " " + $contactRow.Phone
" "
}
}

No comments:

Post a Comment