{"id":139,"date":"2009-01-23T11:00:00","date_gmt":"2009-01-23T11:00:00","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagemas\/?p=139"},"modified":"2024-04-16T09:26:26","modified_gmt":"2024-04-16T09:26:26","slug":"auto-execution-of-mas-500-tasks","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/","title":{"rendered":"Auto Execution of MAS 500 tasks"},"content":{"rendered":"<p>Here\u2019s a very useful piece of code you can use to run a MAS 500 task without having to login manually or open the MAS 500 desktop.<\/p>\n<p>Suppose you have an import task in MAS 500 which has to be executed everyday. So usually the user would have to login to MAS 500 everyday 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 MAS 500 task everyday, it would save a lot of manual labor. And that\u2019s exactly what the following piece of information will help you with.<\/p>\n<p>The following code has been done in VB.Net. You will need Visual Studio to proceed further. You will need Visual Studio 2003 for MAS 500 version 7.00 and Visual Studio 2005 for MAS 500 versions 7.05 &amp; 7.2.<\/p>\n<p>Open a new windows application project in Visual Studio.<\/p>\n<p>You will need to add the following references to the project:<\/p>\n<ul>\n<li>Accounting.Framework.Common<\/li>\n<li>Accounting.Framework.ObjectManager<\/li>\n<\/ul>\n<p>The above DLL\u2019s can be found at <i>\u2018Program FilesSage SoftwareSage MAS 500 ClientManaged ApplicationsFramework\u2019<\/i>.<\/p>\n<p>As shown in the code given below the steps to follow are:<\/p>\n<ol>\n<li>Create an ObjectManagerWrapper object.<\/li>\n<li>To login to Mas 500, pass required parameters to the Login function of the ObjectManagerWrapper object. The parameters are Server name, System database name, Application database name, Trusted Connection, User name, Password, CompanyID, Language ID and Login Option.<\/li>\n<li>The Login function returns a boolean value. If the boolean value returned is true, we shall go ahead with running\/executing the MAS 500 task.<\/li>\n<li>Run the MAS 500 task by calling the \u2018LaunchTask\u2019 method of the OjectManagerWrapper object. You need to pass the Task ID of the MAS 500 task as an integer parameter.<\/li>\n<li>Once the task is run we can logout of MAS 500 using the Logout method of the ObjectManagerWrapper object.<code>Dim _ObjMgrWpr As ObjectManagerWrapper<\/code>&#8216;Create object<br \/>\n_ObjMgrWpr = New ObjectManagerWrapper&#8217;Login to MAS 500<br \/>\nlbln_Login = _ObjMgrWpr.Login(pstr_ServerName, pstr_DBName, pstr_DBName, False, pstr_UserName, pstr_Password, pstr_CompanyID, 1033, Constants.LoginOption.ChangeAll)<\/p>\n<p>&#8216;Check if login was successful<br \/>\nIf lbln_Login = True Then<\/p>\n<p>&#8216;Launch MAS 500 task<br \/>\n_ObjMgrWpr.LaunchTask(100000000)<\/p>\n<p>&#8216;Log out of MAS 500<br \/>\n_ObjMgrWpr.Logout()<\/p>\n<p>Else<br \/>\n&#8216;If login was unsuccessful, log error<br \/>\nEnd If<\/p>\n<p>&nbsp;<\/li>\n<\/ol>\n<p>For any queries, feel free to contact us at&nbsp;<a href=\"mailto:sage@greytrix.com\">sage@greytrix.com<\/a>.<\/p>\n<p><span style=\"font-size: Medium;\"><strong>About Us<\/strong><\/span><br \/>\n<a href=\"http:\/\/www.greytrix.com\/\">Greytrix<\/a> is a one stop solution provider for Sage ERP and Sage CRM needs. We provide complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation expertise.<\/p>\n<p>Greytrix&nbsp;has some unique solutions of&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/sage-crm\/gumu-sage-100-erp-integration\">Sage 100 integration with Sage CRM<\/a>,&nbsp;and <a href=\"https:\/\/www.greytrix.com\/product\/sage-100-erp\/gumu-100-salesforce-integration\">Salesforce.com<\/a> along with <a href=\"https:\/\/www.greytrix.com\/product\/sage-100-erp\/sage-50-us-sage-100-migration\">Sage 100 Migration from Sage 50 US<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/intacct-apps-and-products\/gumu-sage-intacct-sage-100-migration\">Sage Intacct<\/a>, <a href=\"https:\/\/www.greytrix.com\/product\/sage-100-erp\/quickbooks-sage-100-migration\">QuickBooks<\/a>, Sage Business Vision and Sage Business Works. We also offer best-in-class&nbsp;<a href=\"https:\/\/www.greytrix.com\/product\/erp-development\/sage-100-erp\">Sage 100 customization and development services&nbsp;<\/a>to Sage business partners, end users, and Sage PSG worldwide.<\/p>\n<p>For more details on Sage 100 Services, please contact us at&nbsp;<a href=\"mailto:sage@greytrix.com\">sage@greytrix.com<\/a>. We will be glad to assist you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here\u2019s a very useful piece of code you can use to run a MAS 500 task without having to login manually or open the MAS 500 desktop. Suppose you have an import task in MAS 500 which has to be executed everyday. So usually the user would have to login to MAS 500 everyday and\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118,213],"tags":[509,413,510],"class_list":["post-139","post","type-post","status-publish","format-standard","hentry","category-mas-500-login","category-tips","tag-auto-execution-of-mas-500","tag-sage-500-erp","tag-sage-500-technical-blogs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Automated execution of MAS 500 tasks<\/title>\n<meta name=\"description\" content=\"Learn how to launch a MAS 500 task without explicitly logging in or opening the MAS 500 desktop.\" \/>\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\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Automated execution of MAS 500 tasks\" \/>\n<meta property=\"og:description\" content=\"Learn how to launch a MAS 500 task without explicitly logging in or opening the MAS 500 desktop.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.greytrix.com\/blogs\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/\" \/>\n<meta property=\"og:site_name\" content=\"GUMU\u2122 Integrations \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"article:published_time\" content=\"2009-01-23T11:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-16T09:26:26+00:00\" \/>\n<meta name=\"author\" content=\"greysagemas\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"greysagemas\" \/>\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\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/\",\"name\":\"Automated execution of MAS 500 tasks\",\"isPartOf\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagemas\/#website\"},\"datePublished\":\"2009-01-23T11:00:00+00:00\",\"dateModified\":\"2024-04-16T09:26:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagemas\/#\/schema\/person\/b57e6e3564a12ef62967850ae0416728\"},\"description\":\"Learn how to launch a MAS 500 task without explicitly logging in or opening the MAS 500 desktop.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.greytrix.com\/blogs\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.greytrix.com\/blogs\/sagemas\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Auto Execution of MAS 500 tasks\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagemas\/#website\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagemas\/\",\"name\":\"GUMU\u2122 Integrations \u2013 Tips, Tricks and Components\",\"description\":\"Welcome to the GUMU\u2122 blog, your one-stop source to gain all the insights on seamless integration solutions for ERP and CRM systems. Developed by Greytrix, GUMU\u2122 is a powerful integration platform that bridges the gap between your business applications. Whether you\u2019re looking to integrate a CRM (Salesforce, Dynamics 365 CRM, and Sage CRM) or an ERP (Sage ERP, Acumatica) with each other or any other third-party application, GUMU\u2122 is a robust and reliable integrator tailored to your unique needs. Join us as we explore the abilities of GUMU\u2122 and learn how it transforms your integration experience. \",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.greytrix.com\/blogs\/sagemas\/?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\/sagemas\/#\/schema\/person\/b57e6e3564a12ef62967850ae0416728\",\"name\":\"greysagemas\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sagemas\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"caption\":\"greysagemas\"},\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagemas\/author\/greysagemas\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Automated execution of MAS 500 tasks","description":"Learn how to launch a MAS 500 task without explicitly logging in or opening the MAS 500 desktop.","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\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/","og_locale":"en_US","og_type":"article","og_title":"Automated execution of MAS 500 tasks","og_description":"Learn how to launch a MAS 500 task without explicitly logging in or opening the MAS 500 desktop.","og_url":"https:\/\/www.greytrix.com\/blogs\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/","og_site_name":"GUMU\u2122 Integrations \u2013 Tips, Tricks and Components","article_published_time":"2009-01-23T11:00:00+00:00","article_modified_time":"2024-04-16T09:26:26+00:00","author":"greysagemas","twitter_card":"summary_large_image","twitter_misc":{"Written by":"greysagemas","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.greytrix.com\/blogs\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/","url":"https:\/\/www.greytrix.com\/blogs\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/","name":"Automated execution of MAS 500 tasks","isPartOf":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagemas\/#website"},"datePublished":"2009-01-23T11:00:00+00:00","dateModified":"2024-04-16T09:26:26+00:00","author":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagemas\/#\/schema\/person\/b57e6e3564a12ef62967850ae0416728"},"description":"Learn how to launch a MAS 500 task without explicitly logging in or opening the MAS 500 desktop.","breadcrumb":{"@id":"https:\/\/www.greytrix.com\/blogs\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.greytrix.com\/blogs\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.greytrix.com\/blogs\/sagemas\/2009\/01\/23\/auto-execution-of-mas-500-tasks\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.greytrix.com\/blogs\/sagemas\/"},{"@type":"ListItem","position":2,"name":"Auto Execution of MAS 500 tasks"}]},{"@type":"WebSite","@id":"https:\/\/www.greytrix.com\/blogs\/sagemas\/#website","url":"https:\/\/www.greytrix.com\/blogs\/sagemas\/","name":"GUMU\u2122 Integrations \u2013 Tips, Tricks and Components","description":"Welcome to the GUMU\u2122 blog, your one-stop source to gain all the insights on seamless integration solutions for ERP and CRM systems. Developed by Greytrix, GUMU\u2122 is a powerful integration platform that bridges the gap between your business applications. Whether you\u2019re looking to integrate a CRM (Salesforce, Dynamics 365 CRM, and Sage CRM) or an ERP (Sage ERP, Acumatica) with each other or any other third-party application, GUMU\u2122 is a robust and reliable integrator tailored to your unique needs. Join us as we explore the abilities of GUMU\u2122 and learn how it transforms your integration experience. ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.greytrix.com\/blogs\/sagemas\/?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\/sagemas\/#\/schema\/person\/b57e6e3564a12ef62967850ae0416728","name":"greysagemas","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sagemas\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","caption":"greysagemas"},"url":"https:\/\/www.greytrix.com\/blogs\/sagemas\/author\/greysagemas\/"}]}},"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagemas\/wp-json\/wp\/v2\/posts\/139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagemas\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagemas\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagemas\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagemas\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":3,"href":"https:\/\/www.greytrix.com\/blogs\/sagemas\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"predecessor-version":[{"id":3806,"href":"https:\/\/www.greytrix.com\/blogs\/sagemas\/wp-json\/wp\/v2\/posts\/139\/revisions\/3806"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagemas\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagemas\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagemas\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}