GetCreditNotesByExternalReference - accountsIQ/API-Wiki GitHub Wiki

The GetCreditNotesByExternalReference function retrieves a list of sales order that have a given external reference.

Declaration

C#

public WSResult2OfArrayOfCreditNote GetCreditNotesByExternalReference(string token, string externalReference)

Visual Basic

Public Function GetCreditNotesByExternalReference(ByVal token As String, ByVal externalReference As String) As WSResult2OfArrayOfCreditNote

Parameter List

Parameter Type Description
token String The session token retrieved during authentication.
externalReference String External reference to look the CreditNote up with.

Example

C#

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.
    }
}

Visual Basic

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

See Also

⚠️ **GitHub.com Fallback** ⚠️