How to create a SuperOffice Quote Connector
Pre-requisites
Install Visual Studio
Install SuperOffice Sales & Marketing Windows version on the computer.
Note
The example assumes that you have installed the windows client on "C:\Program Files (x86)\SuperOffice\SuperOffice 7 Windows". Adjust your path accordingly.
Basics
Open Visual Studio, but Run as Administrator. You will need this to be able to set the build output to a subfolder of Program files.
Select Create new project from the menu
- Select "Visual C#"
- Select "Class library" and give it a name, like "MyQuoteConnector" (or "SAP Connector")
- Select OK
Right-click on References in the Solution explorer and select "Add references…"
- Select "Browse", and "Browse" again.
- Navigate to where you installed SuperOffice and select SOCore.dll and SuperOffice.Plugins.dll
Right-Click on the project in solution explorer and select " Properties".
- Select Build tab
- Set "Output path" = C:\Program Files (x86)\SuperOffice\SuperOffice 7 Windows\
- Save and close the properties window.
Open "Class1.cs"
Insert
using SuperOffice.CRM;
(If you are using the version that was made around Christmas 2012) Insert
using SuperOffice.Plugins.CRM.Sale;
Insert
[QuoteConnector( Name )]
over the class def. This attribute is used to identify the class by SuperOffice as an ERPQuoteConnector.Insert
public const string Name = "MyQuoteConnector";
inside the class. This name is used (via the attribute over) to identify the class by SuperOffice when it is dynamically loaded from the SuperOffice.config file. You shall have to insert this name and the name of the .DLL into the SuperOffice.config file’sDynamicLoad
section later.
If you just want to replace or extend part of an ERP connector
Right-click on References in the Solution explorer and select "Add references…"
- Select "Browse", and "Browse" again.
- Navigate to where you installed SuperOffice and select the connector you want to extend, for instance: SuperOffice.QuoteConnector.dll
Inherit "SuperOffice.CRM. QuoteConnectorExtender" in Class1
Create a constructor where you reference the ERP connector you want to extend, something like this:
public Class1(): base( new SuperOffice.QuoteConnector. SuperOfficeQuoteConnector()) { }
Override the function(-s) you want to override. (for instance "OnQuoteLineChanged")
Goto "When Done" J
If you don’t want to extend an existing ERP connector
Inherit "SuperOffice.CRM. QuoteConnectorBase" in Class1. This class has a lot of what you want to do implemented already. it implements IQuoteConnector and IPlugin. Implement the abstract class
SuperOffice.CRM.QuoteConnectorBase
.Implement Quote Connector Setup functions
Implement Product Provider functions
If you want to handle Orders, implement the Order Consumer functions
Goto "When Done" J
When Done
Build your connector DLL
DynamicLoad. Either use the SOLOADER panel in Windows Admin client or change the config file as shown below.
- Open SuperOffice.config from the installation folder.
- Insert the following line under
<DynamicLoad>
:
<add key = " MyQuoteConnector " value = " MyQuoteConnector.dll " />
Run admin
Click on the "Quote" element in the navigator on the left side.
Observe that you can see the Connector in the connector list
Add a connection to your connector.
Start SuperOffice win client
Create a new sale.
Create a quote with the new connector.