CSupplierAccountTransaction

From Sage Evolution SDK | Documentation Portal
Revision as of 10:55, 23 October 2015 by Admin (Talk | contribs)

Jump to: navigation, search

The supplier class is used to create Supplier Accounts which can be used on supplier related processes.

The following code displays how a new supplier is created with the basic necessary properties like Code and description specified.

//Assign variable S to Supplier class
Supplier S = new Supplier();
//Specify Supplier properties
S.Code = "SupplierSDK1";
S.Description = "supplierSDK1";
//Use the save method to Save the Supplier
S.Save();

The same supplier can be edited and saved again with updated information like addresses and telephone number.

Supplier S = new Supplier("SupplierSDK1");
//Set new properties
S.Telephone = "113456";
S.EmailAddress = "Supplier@SDK";
//Set Postal or physical address
S.PostalAddress = new Address("Postal Address 1", "Post 2", "Post 3", "Post 4", "Post 5", "PC");
S.PhysicalAddress = new Address()
{
    Line1 = "Physical1",
    Line2 = "Physical2",
    Line3 = "Physical3",
    Line4 = "Physical4",
    Line5 = "Physical5",
    PostalCode = "2000",
};
//Use the save method to Save the Supplier
S.Save();
<syntaxhighlight>