Open the Sage 300 OCX screens in .Net Framework

By | July 31, 2021

Here’s a very useful piece of code you can use to run a Sage 300 task without having to login manually or open the Sage 300 desktop.

New Stuff: New web screens includes in Accounts Receivable 300C v2021.2

Suppose you have an import task in Sage 300 which has to be executed every day. So usually the user would have to login to Sage 300 every day and manually run the task. This can be very arduous. If you had a utility which you can simply schedule using windows scheduler to run the Sage 300 task every day, it would save a lot of manual work and that’s exactly what the following piece of information will help you with.

The following code has been done in VB.Net. You will need Visual Studio to proceed further.

Below are the Visual Studio versions compatible with Sage 300 versions:

Sage 300 versionVisual Studio version
Sage 300 20192015
Sage 300 20202015, 2017
Sage 300 20212017

Open the visual studio with “Run as administrator” permission and create a windows application project in Visual Studio.

  1. You will need to add the following code in the project:

Public WithEvents dynamicScreen As AxHost

  1. The above reference can be found in System.Windows.Forms.
  2. Once you declared the object then you need to add below code in Page load event.

dynamicScreen = Controls.AddExtended(“AccpacOE1100.AccpacOE1100UICtrl”, “OE1100”)

dynamicScreen.Visible = True

  1. Inside the Add Extended method, user need to provide OCX class name with control name “AccpacOE1100.AccpacOE1100UICtrl” and RotoID “OE1100”.
  2. Once you have done all the changes, execute the project to load the Order entry screen in Window Application in .Net framework.
Form1

For any further assistance, feel free to contact us at ‘accpac@greytrix.com’.

About Us

Greytrix – a globally recognized and one of the oldest Sage Development Partner is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation competence.

Greytrix offers unique GUMU™ integrated solutions of  Sage 300 with Sage CRM, Salesforce(listed on Salesforce Appexchange), Dynamics 365 CRM and Magento eCommerce along with Sage 300 Migration from Sage 50 US, Sage 50 CA, Sage PRO, QuickBooks, Sage Business Vision and Sage Business Works. We also offer best-in-class Sage 300 customization and development services and integration services for applications such as POS | WMS | Payroll | Shipping System | Business Intelligence | eCommerce for Sage 300 ERP and for Sage 300c development services we offer, upgrades of older codes and screens to new web screens, latest integrations using Data and web services  to Sage business partners, end users and Sage PSG worldwide.

Greytrix offers 20+ addons for Sage 300 to enhance productivity such as GreyMatrixDocument AttachmentDocument NumberingAuto-Bank ReconciliationPurchase Approval SystemThree way PO matchingBill of Lading and VAT for Middle East. The GUMU™ integration for Dynamics 365 CRM – Sage ERP is listed on Microsoft Appsource with easy implementation package.

The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.

For more details on Sage 300 and Sage 300c Services, please contact us at accpac@greytrix.com, We will like to hear from you.