Sage Developers – SDK Essentials

Summary

This document details the prerequisites of the SDK. This is intended for new Sage 50 Accounts and Sage 200 developers with little to no experience of using the SDK.

Description

NOTE: Sage 50 Accounts / Sage 200 must be installed and the getting started guide should have been followed.

Resolution

Sage 50 Accounts
Creating a Dedicated SDO user

We recommend that a new dedicated user is setup for your application to connect via the SDO.

Targeting rules

If your application is to be deployed on 64 bit operating systems. We recommend that the CPU you target is x86 as in the screen shot below.

Image

References

Create your external application and add the following reference to your project.

  • SdoENGXXX.tlb(xxx refers to version number)

It is necessary to reference the SdoENGXXX.tlb file above as it gives you access to the Sage Data Objects. For more information on referencing. Please visit the Adding a reference to your project section of the help files.

Image

Environment

The SDO has the same system requirements as the Sage 50 Accounts program. System requirements for Sage 50 Accounts program can be found here.

Demo data

Demo data is created when the program is first installed. The default location is here: (C:\ProgramData\Sage\Accounts\XXXX\DemoData\ACCDATA)

We recommend that this dataset is used for testing purposes when developing your application.

(XXXX in data path should show calendar year of version e.g. v24 is 2018)

Sage 200
Downloading and installing
  • Downloading the kit from the developer portal

You can download the most recent development kit from our website along with older versions if required. From here you can also access the latest assemblies and our help documentation which we recommend visiting if any additional information is needed when reading this guide. The help document takes you through every aspect of developing with Sage 200 alongside detailed examples and supporting material.

Download the Sage 200 SDK from here.

Navigate through the tabs to the version you wish to access the download for. From here you can find the SDK tools amongst other useful downloads. Choose this option to download and then unzip the package. Within the package you will receive the Windows installer used to set up the SDK tools and a folder containing the assemblies which are needed when creating external applications.

  • Installing the kit on your environment

Run the installer and following the instructions until completion. You can then access the software development kit tools from your chosen location.

SDK Default Location: C:\Program Files (x86)\Sage 200 SDK)

  • Tools Included with the SDK

The install adds several components to compliment the Sage 200 installation, aimed at assisting 3rd party developers to write Sage 200 Add-ons. These components are:

Form Designer - A tool that enables you to simply customise Sage 200 forms by providing a graphical means of manipulating the layout of the controls that make up a form.

ObjectStore Builder - Add fields to existing Sage 200 objects or build new persistent objects. Except for your own business logic, the utility provides all the code required to post to and read from an additional table.

Add-on Packager - Build Add-on packages which are used for the deployment of third-party Sage 200 Add-ons.

Report Reset - Changes the settings (such as resetting the 'Last Run Date', preventing a report from being added to the Favourites list, resetting printer settings, etc) on individual reports. This replaces the Flags Editor utility, which is no longer supported.

Query Editor - Allows the creation and editing of Workspace queries. To edit an out-of-the-box query you must first copy the corresponding XML file to C:\Sage\im content\modifications\queries.

Exception Viewer - Provides an easily searchable view of Sage 200 exceptions and allowable warnings. For further information see the utilities built-in User Guide..

Add-on View Extender - Used to extend custom add-in fields into ObjectStore views.”..

Data Model Builder - A utility that provides extensive options for creating custom data model extensions, see the utilities built-in User Guide for further information.

Workspace Converter - A utility that allows workspaces from previous versions of Sage 200 to be converted to work for Sage 200 2013.

  • Additional Included Files

As well as the above utilities, several extra files are also installed.

FormExplorer.sdbx is installed to the Sage 200 SDK directory

Workspace Queries - These can be copied to C:\Sage\im content\modifications\queries to allow the editing of Workspace Queries.

whitelist.xml - Used with the Add-on Packager to validate server-side components, prior to deployment. an updated whitelist can be found in the Developer Downloads area.

Form Explorer
  • Discovering Form explorer

The Sage Developer Services Form Explorer is a tool designed to assist developers in exploring all aspects of the Sage 200 forms and provide them with all the information they need to script, customise and understand them.

An Add-on package containing this utility is copied to %Program Files%\Sage 200 SDK, as part of the Sage 200 Developer Tools installation. The Add-on package can be installed through the System Administrator Application (SAA).

After installation Form Explorer will be available once any Sage 200 form has been opened. To open Form Explorer either double or right click on the notification icon, or by default you can press F9 while a Sage 200 form has focus. Form Explorer will then open and can be positioned anywhere on the screen to provide information about the currently opened forms.

NOTE: Form explorer is not available on manufacturing forms.

Image

Form Designer
  • Discovering Form designer

A Sage 200 Form Designer tool is shipped as part of the Sage 200 Developer SDK and aims to simplify the customisation of Sage 200 forms by providing a graphical means of manipulating the layout of the controls that make up a form. It works in conjunction with the System Administration; the ObjectStore Builder Tool (which permits the definition of additional fields and objects) and the existing scripting mechanisms to provide a complete extension mechanism.

Launching the form designer is a simple process and involves first launching the required form from the Sage 200 desktop as normal. Then press F10. This launches the Form Designer and loads the displayed Sage 200 form into it.

Image

External Application Setup
  • Setting up your external application

You can use the software development kit to build an external application which will use the Sage 200 business objects and controls to read and write data to the database. The first step with using these objects is to create a visual studio project using .NET Framework 4.5.2.

Visual Studio > New Application > Windows Forms Application

Image

After naming your project and choosing ‘OK’ you next need to add references to the 200 assemblies. Find the assemblies folder which was downloaded along with the SDK or head to the download page on our website for the latest versions. Add the minimum references required for the module you’re developing against. After adding these references set there copy local to false. The following is the minimum required for financials:

  • Sage.Accounting.Common.dll
  • Sage.Accounting.Common.PersistentObjects.dll
  • Sage.Accounting.Financials.dll
  • Sage.Accounting.PersistentObjects.dll
  • Sage.Common.dll
  • Sage.ObjectStore.dll
  • Sage.Utils.dll

You can download the Sage 200 assemblies here.

What's Next?
  • Installing the demonstration data

Demo data will insert information into your system to be used for development and testing purposes. A copy of the Sage 200 Professional Demonstration data can be downloaded here.

  • Connecting to Sage 200

The next step after installing the software development kit and setting up your visual studio is connecting to a Sage 200 company through the external application. Our development basics document follows on from this point, walking you through writing code for connecting and then looking at how to use some of 200’s popular modules through the 200 objects.

Access to Sage 50 Accounts developer basics can be found here.

Access to Sage 200 developer basics information can be found here.

Solution Properties

Solution ID
200619125740118
Last Modified Date
Thu Oct 06 07:37:51 UTC 2022
Views
0