GetNewSupplierFromDefaults - accountsIQ/API-Wiki GitHub Wiki

The GetNewSupplierFromDefaults returns a new Supplier pre-populated with the Supplier defaults values.

The system maintains a set of default settings for each new Supplier created in the system. This is maintainable from the front-end.

Important Note: The returned Supplier has not yet been created in the system and needs to be saved using the UpdateSupplier method.

##Declaration

C#

public WSResult2OfSupplier GetNewSupplierFromDefaults(string token, string SupplierCode)

Visual Basic

Public Function GetNewSupplierFromDefaults(ByVal token As String, ByVal SupplierCode As String) As WSResult2OfSupplier

Parameter List

Parameter Type Description
token String The session token retrieved during authentication.

Example

C#

Integration ws = new Integration();

String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
  WSResult2OfSupplier it = ws.GetNewSupplierFromDefaults(auth);
  Assert.IsTrue(it.Result != null);
  Assert.IsTrue(it.Status == OperationStatus.Success);
}

Visual Basic

Dim ws As New Integration

Dim auth As String = ws.Login(entityID, partnerKey, userKey)
If (Not auth Is Nothing) Then
  Dim it As WSResult2OfSupplier = Me.ws.GetNewSupplierFromDefaults(Me.auth)
  Assert.IsTrue((Not it.Result Is Nothing))
  Assert.IsTrue((it.Status = OperationStatus.Success))
End If

##See Also

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