Need Help?
  • Application Remote Support
  • Infrastructure Remote Support
  • Sage HRMS Remote Support
  • Helpdesk
  • General Inquiry
1-800-719-3307
Net at Work Net at Work
  • Solutions & Services
    • ERP/Accounting

      ERP Services
      Acumatica
      NetSuite
      Sage X3
      Sage Intacct
      Sage 100 ERP
      Sage 300 ERP
      Sage 500 ERP

      CRM

      Strategic Advisory Services
      Digital Marketing Solutions
      CRM Training Camp
      Salesforce
      Microsoft Dynamics 365 CRM
      Sage CRM
      Infor CRM (formerly Saleslogix)

      Employer Solutions

      Sage HRMS
      Sage People
      Criterion
      Miviva

      Enterprise Content Management

      Imaging / Scanning
      Document Management
      Workflow Automation
      Solutions

      Nonprofit Solutions

      Abila by Community Brands
      NetSuite
      Sage
      Salesforce

      IT and Security Services

      Managed IT Services
      Fractional CIO Services
      Cloud Services
      Cloud at Work
      DR/Business Continuity Planning
      Compliance & Security
      Storage & Recovery
      Networking
      IT Security Services
      Communications

      Web Solutions

      Services Overview
      B2B Technology Suite
      Magento eCommerce
      WordPress CMS
      Systems Integration
      Website Managed Services
      Online Marketing & SEO
      ERP eCommerce Integration

      Additional Solutions

      Enterprise Business Intelligence
      Avalara Automated Tax Solutions
      Fortis Payments
      LeaseQuery Lease Accounting
      Sage Fixed Assets
      Vertex SMB Sales and Use Tax
  • Industries
    • Industries

      Healthcare
      Chemicals
      Food & Beverage
      Medical Devices
  • Learning Center
    • Online Resources

      Recorded Webinars
      Whitepapers
      Ebooks

      Upcoming Events

      Live Webinars
      Seminars
      Virtual Training Courses

      Training Courses

      View all available training course options
  • Company
    • Why Us

      Who We Are
      Management
      Our Partners
      Locations
      Careers

      News

      Press Releases
      Success Stories
      Net at Work Blog

      Contact Us

      1.800.719.3307
      Email Us

      Programs

      Alliance Partnership Program
      Women at Work
      Diversity and Inclusion
  • Blog
  • Contact Us
  • Contact Us

Home » Newsletters » Sage 300 Newsletter – April 2016 » The Basics of Connecting to Sage 300 Using the API

Sage 300 Newsletter – April 2016

Keeping You Up-To-Date With Information About Sage 300

The Basics of Connecting to Sage 300 Using the API

By: Ronnie Burle, Senior Technical Architect

sage300-article-api When integrating with Sage 300, the first step is to establish a connection. A valid connection will allow your system to read and write data from Sage 300 per your particular needs. There are two basic ways to establish a connection: programmatic or implementing Signon manager. Depending on the type and specifications of your integration, you would choose one method over the other.

SignOn Manager

You would use Signon Manager if you have an integration that requires a user to interactively sign into Sage 300. There are a number of reasons to use this method. For example, if you wanted to track which users were creating transactions in Sage 300, you would have them log in using Signon Manager. Another reason would be if you wanted to make your UI company independent. You would have the user log in using Signon Manager which includes choosing which company to log into. In fact, Signon Manager is the same interface used by Sage 300, so users will have a familiar login screen in your application. You don’t have to write any authentication routines, it is all built into the control.

To use Signon manager in your application, you will need to add a reference to it. Here is an example of adding the reference in Visual Studio:

sage-300-api-01

Note that it will also add a reference to the “Accpac COM API” if you do not have it because there is a dependency.

After adding a reference, you can instantiate Signon manager in code. Here is a VB.NET example:

sage-300-api-06

Using the Signon method will pop up the login screen Sage 300 users are accustomed to:

sage-300-api-02

Once signed in, the code above displays the company ID and name in the title:

sage-300-api-03

Once you have your session via the Signon manager, you can open a DB link and from there you can interact with the company’s data. As you can see from the sample code above, in just a few lines of code you can be on your way to integrating with Sage 300.

Connecting programmatically

You would use this method of connecting to Sage 300 if your integration did not require any user interaction. Your application would need to store the user name, password and company ID that you will be connecting to. Typically, you would create a generic user or use the “Admin” user for this method. The same principles apply as the Signon manager method. You would need to initialize a session object, then login, then establish your DB link. First, you need to add a reference to the Accpac COM API. Here is an example of adding the reference in Visual Studio:

sage-300-api-04

Here is an example of establishing a connection using VB.NET:

sage-300-api-05

Using the “Open” method and supplying the credentials will let you log into Sage 300 programmatically.

As you can see, there are different methods to connect to Sage 300 and depending on the integration, you will choose the more appropriate one. If you need assistance with any integration needs, our team at Net at Work will be happy to help.

« Return to Newsletter

In This Issue
  • From the Desk of the Sage 300 Practice Director
  • Sage 300 Backup Procedures
  • Sage 300 Payment Processing: Ten Reasons to Integrate Your Payments
  • Managing Large Capital Projects in Sage 300
  • Sage 300 Tips: Look Up Payment Information & AP/AR Invoice Entry Quick Mode
  • The Basics of Connecting to Sage 300 Using the API
  • Are You Spending Too Much on Your Business Technology? Or Too Little?
  • Sage 300 Support

    Helpdesk:
    P: 888.494.9479
    E: helpdesk@netatwork.com

    Sage 300 Webinar Series

    Tips for Sage Users to Improve Data-Driven Decision-Making
    March 28 | 2pm ET
    Register Here

    Recruiting & Quiet Hiring: What Quiet Quitting / Hiring Means for 2023 & How Technology Can Help
    March 28 | 2pm ET
    Register Here

    Sage-Integrated Document Management: From Chaos to Control
    April 7 | 2pm ET
    Register Here

    Sage Intacct Overview Demo
    April 7 | 2pm ET
    Register Here

    Popular Recorded Webinars

    Sage Cloud Hosting: Moving On-Premise Sage 300 to the Cloud

    Building a Next Generation Finance Organization with Next Gen ERP Tools

    Reducing Manual Tasks in Your Sage Accounting & Shipping Processes

    Bridge Your Sage 300 Gaps

    Sage 300 Webinar Archive

    View our library of on-demand recorded webinars.

    Newsletter Archive

    Read our previous Sage 300 Newsletters here

    Connect With Us

    Business Applications

    • Overview
    • ERP/Accounting
    • Cloud ERP
    • CRM
    • Employer Solutions
    • ECM
    • Nonprofit Solutions

    Learning Center

    • White Papers & Guides
    • Ebooks
    • Training Courses
    • Virtual Training Courses
    • Success Stories
    • Live Webinars
    • Recorded Webinars
    • Trials

    Infrastructure Solutions

    • Overview
    • Solutions
    • Managed IT Services
    • Fractional CIO & Advisory Services
    • Cloud Services
    • Cloud at Work
    • Compliance & Security
    • DR/Business Continuity

    Support

    • Application Remote Support
    • Infrastructure Remote Support
    • Sage HRMS Remote Support
    • General Inquiry
    • Helpdesk

    Web Development

    • Services Overview
    • Magento eCommerce
    • WordPress CMS
    • Systems Integration
    • Website Managed Services
    • ERP eCommerce Integration

    Company Information

    • Why Us
    • Alliance Partnership Program
    • Women at Work
    • Diversity and Inclusion
    • Partners
    • Careers
    • News
    • Blog
    • Privacy Policy
    • Contact Us

    Additional Solutions

    • Enterprise Business Intelligence
    • Avalara Automated Tax Solutions
    • Fortis Payments
    • LeaseQuery Lease Accounting
    • Sage Fixed Assets (Sage FAS)
    • Vertex SMB Sales and Use Tax

    Industries

    • Healthcare
    • Chemicals
    • Food & Beverage
    • Medical Devices
    Net at Work
    Net at Work (HQ)
    575 8th Ave
    New York, NY 10018

    P: (800) 719-3307
    info@netatwork.com
    Locations Across North America »
    Visit our sister companies:
    Cloud at Work - Sage Application Hosting
    Pixafy - An eCommerce Agency
    Docutrend
    WordPress Image Lightbox Plugin