{"id":28063,"date":"2020-04-23T12:38:23","date_gmt":"2020-04-23T12:38:23","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/?p=28063"},"modified":"2024-05-03T06:50:33","modified_gmt":"2024-05-03T06:50:33","slug":"get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/","title":{"rendered":"Get List of Companies programmatically from Sage 300 using COMAPI in C#"},"content":{"rendered":"\n<p>In\nthis blog, we will be looking on getting List of companies from Sage\n300 using COMAPI in C# .Net. Company information is required when\nworking on integration with 3<sup>rd<\/sup>\nParty Product and also when running an independent application\noutside of Sage 300 ERP.<\/p>\n\n\n\n<p>User can have a good working environment to use the product\/utility for multiple companies without logging into each company within Sage 300 ERP system. It would be as good as creating our own login screen for an application.<\/p>\n\n\n\n<p><strong>New Stuff: <\/strong> <a href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/24\/get-list-of-companies-programmatically-from-sage-300-using-advantage-api-in-c\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Get List of Companies pro-grammatically from Sage 300 using Advantage API in C# (opens in a new tab)\">Get List of Companies pro-grammatically from Sage 300 using Advantage API in C#<\/a><\/p>\n\n\n\n<p>We will be looking into the steps to\ncreate the same with a sample code.<\/p>\n\n\n\n<p>\n<strong>Step 1:<\/strong><\/p>\n\n\n\n<p>\nInclude the Sage 300 COMAPI in the project.<\/p>\n\n\n\n<p> <strong>Step 2:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2020\/04\/1.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2020\/04\/1.png\" alt=\"Information\" title=\"Information\"\/><\/a><\/figure>\n\n\n\n<p> Once the COMAPI is included, create the object of the Session, initialize it and loop through the organizations in the session to get the companies.<\/p>\n\n\n\n<p> The list of companies is now available and can be stored in an Array, List, DataTable or any other object and can be used within our program\/application.<\/p>\n\n\n\n<p><span style=\"font-size: Medium;\"><strong>About Us<\/strong><\/span><\/p>\n\n\n\n<p><a href=\"https:\/\/www.greytrix.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Greytrix<\/a>&nbsp;&#8211; a globally recognized and one of the\noldest Sage Gold Development Partner is a one-stop solution provider for Sage\nERP and Sage CRM organizational needs. Being acknowledged and rewarded for\nmulti-man years of experience, we bring complete end-to-end assistance for your\ntechnical consultations, product customizations, data migration, system\nintegrations, third party add-on development and implementation competence.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.greytrix.com\/\">Greytrix<\/a>&nbsp;offers unique GUMU&#x2122; integrated solutions of&nbsp;&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-crm\/gumu-sage-300-erp-integration\">Sage 300 with Sage CRM,<\/a>&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp\/gumu-300-salesforce-integration\">Salesforce.com<\/a>, Dynamics 365 CRM and&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp\/ecommerce-magento-integration\">Magento eCommerce<\/a>&nbsp;along with Sage 300 Migration from&nbsp;<a href=\"https:\/\/www.greytrix.com\/resources\/sage-erp-crm-migration.pdf\">Sage 50 US, Sage 50 CA, Sage PRO, QuickBooks, Sage Business Vision and Sage Business Works<\/a>. We also offer best-in-class&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/erp-development\/sage-300-erp-development\">Sage 300 customization and development services<\/a>&nbsp;and integration services for applications such as&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/erp-development\/sage-300-integration-services\">POS | WMS | Payroll | Shipping System | Business Intelligence | eCommerce for Sage 300 ERP<\/a>&nbsp;and for Sage 300c development services we offer, upgrades of older codes and screens to new web screens, latest integrations using sData and web services &nbsp;to Sage business partners, end users and Sage PSG worldwide. Greytrix offers 20+ addons for Sage 300 to enhance productivity such as&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/greymatrix-apparel-solution\">GreyMatrix<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/greytrix-document-attachement\">Document Attachment<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/greytrix-document-numbering\">Document Numbering<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/auto-bank-reconciliation\">Auto-Bank Reconciliation<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/purchase-approval-system\">Purchase Approval System<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/three-way-po-matching\">Three way PO matching<\/a>,&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/bill-of-lading\">Bill of Lading<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-300-erp-add-ons\/vat-middle-east\">VAT for Middle East<\/a>. The GUMU&#x2122; integration for Dynamics 365 CRM \u2013 Sage ERP is listed on Microsoft Appsource with easy implementation package.<\/p>\n\n\n\n<p>For more details on Sage 300 and Sage 300c Services, please\ncontact us at&nbsp;<a href=\"mailto:accpac@greytrix.com\">accpac@greytrix.com<\/a>,\nWe will like to hear from you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, we will be looking on getting List of companies from Sage 300 using COMAPI in C# .Net. Company information is required when working on integration with 3rd Party Product and also when running an independent application outside of Sage 300 ERP. User can have a good working environment to use the product\/utility\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[3476,3475,3472,3477,3474,3473,3471,2357],"class_list":["post-28063","post","type-post","status-publish","format-standard","hentry","category-sage-accpac","tag-c","tag-comapi","tag-companies","tag-get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c","tag-list-of-companies","tag-sage-300-companies","tag-sage-300-company","tag-sage-300-erp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Get the list of companies from Sage 300 via COMAPI in C#.<\/title>\n<meta name=\"description\" content=\"Discuss about obtaining the list of Sage 300 firms who use COMAPI in C#.NET.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Get the list of companies from Sage 300 via COMAPI in C#.\" \/>\n<meta property=\"og:description\" content=\"Discuss about obtaining the list of Sage 300 firms who use COMAPI in C#.NET.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/\" \/>\n<meta property=\"og:site_name\" content=\"Sage 300 ERP \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-23T12:38:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-03T06:50:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2020\/04\/1.png\" \/>\n<meta name=\"author\" content=\"Greytrix\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Greytrix\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/\",\"name\":\"Get the list of companies from Sage 300 via COMAPI in C#.\",\"isPartOf\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2020\/04\/1.png\",\"datePublished\":\"2020-04-23T12:38:23+00:00\",\"dateModified\":\"2024-05-03T06:50:33+00:00\",\"author\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/93977cd8aa8fbd1f151d3f664e29c9f2\"},\"description\":\"Discuss about obtaining the list of Sage 300 firms who use COMAPI in C#.NET.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/#primaryimage\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2020\/04\/1.png\",\"contentUrl\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2020\/04\/1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get List of Companies programmatically from Sage 300 using COMAPI in C#\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#website\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/\",\"name\":\"Sage 300 ERP \u2013 Tips, Tricks and Components\",\"description\":\"Explore the world of Sage 300 with our insightful blogs, expert tips, and the latest updates. We\u2019ll empower you to leverage Sage 300 to its fullest potential. As your one-stop partner, Greytrix delivers exceptional solutions and integrations for Sage 300. Our blogs extend our support to businesses, covering the latest insights and trends. Dive in and transform your Sage 300 experience with us! \",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/93977cd8aa8fbd1f151d3f664e29c9f2\",\"name\":\"Greytrix\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3cdb553d6ca07df0e407d5e092f2410d163e0fd40b27734b345b04c8f0786969?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3cdb553d6ca07df0e407d5e092f2410d163e0fd40b27734b345b04c8f0786969?s=96&d=mm&r=g\",\"caption\":\"Greytrix\"},\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/author\/greytrix\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Get the list of companies from Sage 300 via COMAPI in C#.","description":"Discuss about obtaining the list of Sage 300 firms who use COMAPI in C#.NET.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/","og_locale":"en_US","og_type":"article","og_title":"Get the list of companies from Sage 300 via COMAPI in C#.","og_description":"Discuss about obtaining the list of Sage 300 firms who use COMAPI in C#.NET.","og_url":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/","og_site_name":"Sage 300 ERP \u2013 Tips, Tricks and Components","article_published_time":"2020-04-23T12:38:23+00:00","article_modified_time":"2024-05-03T06:50:33+00:00","og_image":[{"url":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2020\/04\/1.png","type":"","width":"","height":""}],"author":"Greytrix","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Greytrix","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/","url":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/","name":"Get the list of companies from Sage 300 via COMAPI in C#.","isPartOf":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/#primaryimage"},"image":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2020\/04\/1.png","datePublished":"2020-04-23T12:38:23+00:00","dateModified":"2024-05-03T06:50:33+00:00","author":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/93977cd8aa8fbd1f151d3f664e29c9f2"},"description":"Discuss about obtaining the list of Sage 300 firms who use COMAPI in C#.NET.","breadcrumb":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/#primaryimage","url":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2020\/04\/1.png","contentUrl":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-content\/uploads\/2020\/04\/1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/2020\/04\/23\/get-list-of-companies-programmatically-from-sage-300-using-comapi-in-c\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/"},{"@type":"ListItem","position":2,"name":"Get List of Companies programmatically from Sage 300 using COMAPI in C#"}]},{"@type":"WebSite","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#website","url":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/","name":"Sage 300 ERP \u2013 Tips, Tricks and Components","description":"Explore the world of Sage 300 with our insightful blogs, expert tips, and the latest updates. We\u2019ll empower you to leverage Sage 300 to its fullest potential. As your one-stop partner, Greytrix delivers exceptional solutions and integrations for Sage 300. Our blogs extend our support to businesses, covering the latest insights and trends. Dive in and transform your Sage 300 experience with us! ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/93977cd8aa8fbd1f151d3f664e29c9f2","name":"Greytrix","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3cdb553d6ca07df0e407d5e092f2410d163e0fd40b27734b345b04c8f0786969?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3cdb553d6ca07df0e407d5e092f2410d163e0fd40b27734b345b04c8f0786969?s=96&d=mm&r=g","caption":"Greytrix"},"url":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/author\/greytrix\/"}]}},"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/posts\/28063","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/comments?post=28063"}],"version-history":[{"count":8,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/posts\/28063\/revisions"}],"predecessor-version":[{"id":34465,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/posts\/28063\/revisions\/34465"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/media?parent=28063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/categories?post=28063"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageaccpacerp\/wp-json\/wp\/v2\/tags?post=28063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}