GetActiveSupplierList
PatrickLane edited this page Oct 22, 2014
·
1 revision
The GetActiveSupplierList
function retrieves a list of arrays containing the code and name of active Suppliers from an entity.
public WSResult2OfArrayOfSupplier GetActiveSupplierList(string token)
Public Function GetActiveSupplierList(ByVal token As String) As WSResult2OfArrayOfSupplier
Parameter | Type | Description |
---|---|---|
token | String | The session token retrieved during authentication. |
Integration_1_1 ws = new Integration_1_1();
String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
// Get the list of active Suppliers
accountsIQ.WSResult2OfArrayOfSupplier suplist = ws.GetActiveSupplierList(auth);
Assert.IsNotNull(suplist.Result);
if (suplist.Status == OperationStatus.Success)
{
foreach (Supplier c in suplist.Result)
{
// Do something with each Supplier
}
}
else
{
// Use the ErrorCode field to pinpoint the problem
}
}
Dim ws As New Integration_1_1
Dim auth As String = ws.Login(entityID, partnerKey, userKey)
If (Not auth Is Nothing) Then
' Get the list of active Suppliers
Dim suplist As WSResult2OfArrayOfSupplier = ws.GetActiveSupplierList(auth)
Assert.IsNotNull(suplist.Result)
If (suplist.Status = OperationStatus.Success) Then
Dim c As Supplier
For Each c In suplist.Result
' Do something with each Supplier
Next
End If
Else Then
'Use the ErrorCode field to pinpoint the problem
End If
End If
##See Also