-
Notifications
You must be signed in to change notification settings - Fork 2
GetCreditNotesByExternalReference
PatrickLane edited this page Oct 30, 2014
·
2 revisions
The GetCreditNotesByExternalReference function retrieves a list of sales order that have a given external reference.
public WSResult2OfArrayOfCreditNote GetCreditNotesByExternalReference(string token, string externalReference)
Public Function GetCreditNotesByExternalReference(ByVal token As String, ByVal externalReference As String) As WSResult2OfArrayOfCreditNote
Parameter | Type | Description |
---|---|---|
token | String | The session token retrieved during authentication. |
externalReference | String | External reference to look the CreditNote up with. |
Integration ws = new Integration();
String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
WSResult2OfArrayOfCreditNote CreditNotes = ws.GetCreditNotesByExternalReference(auth, "4/07");
if (CreditNotes.Status == OperationStatus.Success && CreditNotes.Result != null)
{
foreach (CreditNote CreditNote in CreditNotes.Result)
{
// Do something with each CreditNote.
}
}
else
{
// Examine the ErrorCode field for more information on the error.
}
}
Dim ws As New Integration
Dim auth As String = ws.Login(entityID, partnerKey, userKey)
If (Not Me.auth Is Nothing) Then
Dim CreditNotes As WSResult2OfArrayOfCreditNote = Me.ws.GetCreditNotesByExternalReference(Me.auth, "4/07")
If ((CreditNotes.Status = OperationStatus.Success) AndAlso (Not CreditNotes.Result Is Nothing)) Then
Dim CreditNote As CreditNote
For Each CreditNote In CreditNotes.Result
' Do something with each CreditNote
Next
End If
Else
' Examine the ErrorCode field for more information on the error.
End If
End If