Handling iVend Retail Business Objects

Handling iVend Retail Business Objects

Introduction

This knowledge base article will assist developers on how to handle iVend Retail Business Objects when using various events exposed in the iVend Management Console and the iVend POS.

Purpose

As an example, a developer can use iVend Retail Business Objects to create/delete customers or products on the bases of an Id.
There are two types of iVend Business Objects:
· Master Type Business Objects (Customer, Product, etc.)
· Transaction Type Business Objects (TransactionDTO, PaymentDTO, PurchaseOrderDTO, etc).

Code Sample for Handling iVend Retail Business Objects (e.g. Customer)

In this example we are going to use the following code snippet to delete a customer, load an existing customer and create new customer:
//Deleting customer on the basis of ID.
private void DeleteCustomer()
{
Customer cust = CustomerSubSystem.Instance.LoadById("C0003");
CustomerSubSystem.Instance.Delete(cust);
MessageBox.Show("Customer deleted,ID:" + cust.Id.ToString());
}
//Loading existing customer based on ID
private void LoadCustomer()
{
Customer cust = CustomerSubSystem.Instance.LoadById("C0003");
MessageBox.Show("Customer Loaded,Name:" + cust.Name.ToString());
}
//Create new Customer
private void CreateCustomer()
{
Customer cust = CustomerSubSystem.Instance.Create();
cust.FirstName = "TestCustomer1";
cust.CustomerGroup = CustomerGroupSubSystem.Instance.LoadByKey(10000000000000001);
CustomerSubSystem.Instance.Commit(cust);//saving customer in DB.
MessageBox.Show("Customer created,ID:" + cust.Id.ToString());
}

    • Related Articles

    • General Settings in SAP Business One

      Introduction The iVend Add-on helps in setting up some configurations required for integrating iVend with SAP Business One. The following sections of this document capture the functionality of the new screens created and new fields added to the SAP ...
    • SAP Business One - iVend Retail Integration Points

      Introduction SAP Business One software is created specifically for small and midsized businesses. It is a powerful application and iVend Retail seamlessly integrates with it to help retailers better manage every aspect of their daily retail ...
    • POS - Handle iVend business objects

      Introduction iVend Add-on Framework is used for writing Custom Business Logic independently by a programmer. iVend Addon allows to extend business logic either in Management Console or at the Terminal POS.The addon framework allows deployment of ...
    • POS - Handle iVend business objects

      Introduction iVend Add-on Framework is used for writing Custom Business Logic independently by a programmer. iVend Addon allows to extend business logic either in Management Console or at the Terminal POS. The addon framework allows deployment of ...
    • iVend POS - Objects Exposed via API

      Introduction This article contains the list of Objects which are exposed to the iVend API. This article refers to the iVend Help file for all Objects, Operations, etc. Overview This section explains about the various Objects and their exposure to the ...