iVend Retail 6.6 Extensibility AddOn Upgrade Process

iVend Retail 6.6 Extensibility AddOn Upgrade Process

iVend Retail 6.6 Extensibility AddOn Upgrade Process


Overview

The purpose of this article is to enlist the changes in Extensibility Add-On upgrade for iVend Retail 6.6.

iVend Retail 6.6 has significant framework changes due to which changes would be needed in existing add-on projects running on iVend Retail 6.5.X
Without these necessary changes existing add-on will cease to work or result in errors on iVend Retail 6.6
This presentation highlights the necessary changes and explains the process to change code step by step
Existing numeric data in the primary key fields is not an issue. No action is required in iVend Retail 6.6 upgrading process
This presentation is intended for programmer/software architects
How do I get started?
The following are the steps to upgrade the Extensibility Add-On in iVend Retail 6.6:

Upgrade your existing Development Environment of iVend Retail 6.5.x to iVend Retail 6.6
Install DevExpress v18.1 (though this is an optional step, we still recommend the installation of v18.1)
DotNet framework 4.5.2 developer version needs to be installed on the Development server/machine
Execute steps 1 – 10 detailed in the slides below
Once the Add-On is compiled, install and test the Add-On in the upgraded environment of the customer for Unit Testing

Change 1 – Primary keys are now GUIDs

In iVend Retail ver. 6.6, all primary keys are now GUIDs. Therefore, primary key for any UDT (user defined table) would be created as data type ‘nVarchar’ instead of ‘BigInt’.

On upgrade from previous version of iVend Retail, Installer will do the necessary changes in the DB structure while upgrading the base iVend product.

Any existing Add-on program do not need to make any change in the primary key of existing UDTs while upgrading the add-on to the latest version.

However, if any reference key has been created in any UDT to make the foreign-key relationship between any two DB tables. i.e. primary key of any UDT referenced in another UDT field, that must be converted to data type ‘string’ in add-on code. This will result in ‘nVarchar’ db type in the table structure in the database.

iVend Retail ver. 6.5.X DB table structure and data type for primary key
iVend Retail ver. 6.6 DB table structure and data type for primary key

Change 2 – Variable change in the add-on code

Once the Base iVend retail is upgrade to ver 6.6., DB structure is modified at primary key level. •However, datatypes for all variables, properties, method parameters associated with ‘Primary Key' of the UDT would be changed from ‘Int64’ to ‘string’

iVend Retail ver. 6.5.X compatible code sample 
iVend Retail ver. 6.6 compatible code sample 

 Change 3 – Initialization of variables

• Initialize these ‘Primary Key' variables with ‘string.Empty’ instead of ‘0’ (If it is already initialized with numeric zero ‘0’ anywhere in the code)
• To validate string primary key fields and variables for ‘null’ values, compare with ‘string.Empty’ instead of numeric zero ‘0’

Change 4 – Best code practices

• For all existing variables to handle primary key fields, Convert Nullable<Int64> variables to ‘string’ data type as string is nullable by default
• No code or data change is required for the existing data in the database for the primary key fields
• Necessary changes are required in existing T-SQL queries written in the Add-on code.

Change 5 – Dexexpress UI component reference upgrade

Incase, the previous add-on is using Devexpress UI components for custom GUI screen, then all  DevExpress references would be updated to the DevExpress v18.1 only.

Change 6 – New method for Searchview screens

• ‘searchview.AllowBusinessObjectEditing’ property in SearchView screens has been obsolete in iVend Retail ver. 6.6 • ‘searchview.SetAllowBusinessObjectEditing(boolean flag)’ method would be used in lieu of obsolete property Existing property reference

Change 7 – T-SQL level changes in the addon

The SQL queries (in add-on)  where key is appended, single inverted commas (‘ string‘) would be includes at start and end of string.

Type cast the primary key value to ‘nvachar’ for any comparison in sqlqueries  ( in case type casted any where in ‘bigint’)

Convert(bigint, U_CXS_USERDEFINEDTABLE.U_CXS_USERDEFINEDTABLEKey)

            should be converted to

Convert(nvarchar(50), U_CXS_USERDEFINEDTABLE.U_CXS_USERDEFINEDTABLEKey)

Change 8 – Handle return value from SQL in add-on code

In some cases, changed key columns (now nvarchar)  in SQL queries will return "0" in string format instead of string.Empty. This case should be handle as mentioned below.

if (!string.IsNullOrEmpty(keyStr) && Convert.ToInt64(keyStr) >0) {

}
Change 9 – Add-on compatibility for Any CPU compilation

In Configuration Manager select the option “Any CPU” at the time of add-on compilation

Change 10 – Support only X64 compatible 3rd party components

Any third party dll which is needed to be referenced in add-on must be X64 compatible

Change 11 – Custom Report Changes

All Custom reports are required to be re-verified.
Custom Report SQL Queries must be changed in accordance with the changes mentioned in this
document.
Artifacts
iVend Retail 6.6 BETA release note link

CKP ->link

iVend Retail 6.6 Beta Setup link

CKP-  Setup

iVend Add-on upgrade process PPT is attached with this article for reference purposes.
    • Related Articles

    • iVend Retail 6.5 - Extensibility Guide

      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 Retail 6.6 - Extensibility Guide

      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 ...
    • 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 ...
    • Upgrade iVend version from 6.5 to 6.6

      Environment: 6.5.X Statement : Is there any guide to show how to upgrade the iVend version from 6.5 to 6.6, step by step? Resolution: iVend 6.6 is a quantum jump with various new technologies such as Quartz, Signal R, GZip MS IIS, SQL Servers, etc. ...
    • 6.6 iVend Retail - Patch Deployment Process

      Query: How to plan iVend 6.6 upgrade and Patch update? Solution: Please follow the attached "iVend 6.6 Patch deployment Process" document. Additional Information: Patch deployment process document is available in Download section of iVend retail. In ...