Stephen Smith's Blog

Musings on Machine Learning…

Archive for September 2015

International Support in Sage 300c

with 6 comments


Sage 300 has always been an international product that is used in many countries around the world. This includes releasing the product in multiple languages, supporting multi-currency, supporting regional settings for things like dates and having flexible configurations for things like sales taxes. As part of the new Web UIs we’ve also carried through all these features into the world of the Web browser. This article describes how some this works, since the browser is a bit different than setting regional settings in Windows.

Generally if you are in a given location, all your computers and users will all be set to use the correct location, so there is nothing for you to do. But if you do want to change things, need to troubleshoot a problem or experiment then these details could be helpful.

Languages and Locales

In the desktop version of Sage 300 you set the language used with the Sage 300 User. Then when you log in as that user, Sage 300 will load the appropriate language files for that user and display in that language. For things like date formats, the desktop product will get them from the Windows regional settings (i.e. the registry) and use that format. In the browser you select a combined language region locale code which determines both the language and the regional settings (like date format). Below is a table for some of these. For the complete list, check out this website.

Sage 300 Language Code Browser Locale Code Description
ENG en English
  en-AU English (Australia) (date format dd/mm/yy)
  en-US English (US) (date format mm/dd/yy)
FRA fr-CA French (Canadian)
ESN es Spanish (not support in Web UIs until Feb release)
CHN zh-Hans Chinese (Simplified)
CHT zh_Hant Chinese (Traditional)


I didn’t include South Africa which is en-ZA because the date format for that is yyyy/mm/dd. When I Googled en-ZA, all I got was complaints that it should be dd/mm/yy. So if you are South African and like yyyy/mm/dd as your date format then by all means select en-ZA. However is you prefer dd/mm/yy then you might want to pretend you are Australian and select en-AU. We won’t change our English as a result, so hopefully we can avoid any conflicts about shrimp on the braai vs barbie.

You can set this for any of the Browsers by going into their settings and adding languages and setting which is the current one. For Chrome and Firefox there is a really handy add-on that puts the list in a convenient menu at the top so you can easily toggle between these. In Chrome this is the “Quick Language Switcher”. In Firefox this is the “Quick Locale Switcher”.

Below is G/L Journal Entry in various languages and date formats. Note that data in the database is not translated, which is why there is English text in some of the data fields.

G/L Journal Entry displayed in English (Australian)

G/L Journal Entry displayed in English (Australian)

G/L Journal Entry displayed in French (Canadian)

G/L Journal Entry displayed in French (Canadian)

G/L Journal Entry displayed in Chinese (Traditional)

G/L Journal Entry displayed in Chinese (Traditional)

Configuring the Business Logic

Using the Browser settings affects most things, but some language strings and locale settings come from the Business Logic layer. The Business Logic does get some of its settings from Windows, so to get these in sync with the Browser you should set the Sage 300 application pool in IIS to run as a user that is set to the regional settings that you wish. You also have to change the user that the Sage.CNA.WindowsService Service runs under. By default the application pool and the Sage.CNA.WindowsService service will run as “Local System” which works, but has a few problems:

  1. Local system is very high in security settings, so it’s safer to set this to be a regular user (we don’t require admin rights).
  2. Local system can’t access network resources, so if the shared data folder is on another server you need to change this to a user that can access the shared data folder.
  3. It’s easier to login as a regular user and set their settings to what you need.

You should also ensure that the Sage 300 User has the correct language set since any messages generated by the Business Logic will be in the language of the Sage 300 User.

Hybrid Usage

Most people will still be using the VB screens either due to customizations or modules that we haven’t moved to the web yet. Generally if the Browser, Windows users and Sage 300 users are all set to the same thing then you will get consistent languages and regional settings across everything.


As Sage 300 moves into the Browser we want to move our international heritage as well. In the web world there is much better support for many of these things and you will see this in our new Web screens.

Written by smist08

September 26, 2015 at 5:25 pm

Skills for Developing for Sage 300c

with 6 comments


With the Web UIs in Sage 300c rolling out in a couple of weeks, there is a lot of interest in the SDK and how to develop for this platform. We are still putting together the SDK, but in the meantime you can learn the technologies that are involved in developing our new Web UIs. Generally we’ve used off the shelf components both commercial and open source to develop our new UI framework. The good thing about this is that there are lots of resources available to learn the various technologies involved, including books, web sites, samples, videos, courses, etc.


We’ve generally tried to use all these tools in very standard ways. For instance we don’t add large amount of code to custom controls to change their behavior, we’ve kept it standard and only changed their appearance using CSS. We use the ASP.Net MVC framework in a natural way, so what you learn from the various standard resources is all applicable.

Due to the nature of programming, you can often do quite a few creative things. There is nothing to stop you using other libraries or tools than mentioned here. However one of the points of listing these is to let you know which we use, which means if you ask DPP support, these are the tools and libraries that we know about and can help answer questions about. You are welcome to use other tools, but we may not be able to provide much help on them.


C#: All server side programming above the Sage 300 .Net API is written in C#. This is a very powerful object oriented extension to C which is quite similar to Java. It has an extensive standard class library. The tools and environments that support C# are really powerful and productive.

JavaScript: All client/browser programming is in JavaScript. We support newer browsers which all now support fairly standard implementations. The main pitfall of JavaScript is that it’s an interpreted language that will process almost anything, often with surprising results.


ASP.Net MVC: Do not confuse this with ASP.Net (no MVC). This is a completely different framework which is much more powerful and gives a really solid framework for web development.


HTML: HTML controls the general layout of web pages in the browser, however it isn’t as important as it used to be. Our HTML is generated from Microsoft Razor Views, so a good portion of the HTML is actually represented as C# code. Then layout is largely controlled by CSS and not by HTML elements.

CSS: Cascading Style Sheets (CSS) control the layout and look of all the elements on the HTML page. We provide a global stylesheet which has most of what you need. However many screens need to define custom elements for their own fine grained control. We will provide a style catalog and samples of all the main UI elements.


Visual Studio 2013: This is the main IDE where we develop and debug our code. This is a very powerful and productive environment to write, build and debug code. Chances are we will be on to VS 2015 by the time the SDK ships, but for now this is what we developed our 2016 release in. We use the premium edition because that is what comes with our particular MSDN subscription, but any edition will probably be fine.

ReSharper: This is an optional tool that we’ve licensed for all our developers. We’ve found it very helpful to improve the quality of our code and to help with refactoring.

GitHub: Although using a source code control system is optional, you should be using one. Using any of Git, Subversion, TFS, etc. is fine, but you should really be using one. We use GitHub because it is very fast and reliable. The real benefit is that it’s fast for everyone when you have large internationally dispersed teams.

TeamCity: This is another optional component. You can just build out of Visual Studio. We use TeamCity, but you can also use other automated build systems like Jenkins. Its generally a good practice to have a continuous build/integration system that is always building things as they are developed, deploying them and running automated tests to ensure that things aren’t broken.


Kendo UI: This is the library of UI widgets that we use like the editable grid and date control. When we started this project this was strictly a commercial product. However half way through they created the open source Kendo UI Core which has all the controls we use for creating Accounting Screens except the editable grid control. For the grid control and the graphical controls in the KPIs,  you will need to purchase a license for the professional edition.

KnockoutJS: We use knockout for data binding between the UI controls and the MVC models. When we started the project the data binding in Kendo UI didn’t meet our needs so we evaluated alternatives. We found knockout and it did everything we needed so we’ve continued to use it. In the meantime Kendo has improved and AngularJS has become popular, but we’ve stuck with Knockout (which is popular again).

JQuery: Most modern web apps use JQuery. Although its main use of insulating people from browser differences isn’t as important and most browsers have natively implemented its main features, it is still an important library and we use it extensively.

.Net Framework 4.5.1: Since all our server components are written in C# and using the ASP.Net MVC framework, of course we are using the .Net framework. For the 2016 release we are at version 4.5.1. However by the time the SDK ships this will probably be at a higher version.

Sage 300 .Net API: To integrate to the standard Sage 300 Business Logic, we use Sage 300’s .Net API. So when writing code in the MVC models to perform Sage 300 processing, you are writing code to this API.

Crystal Web Viewer: We provide a complete framework for handling Crystal Reports, so you don’t need to directly interact with Crystal. We generate reports using the same code as the desktop version, but then display the result in Crystal’s HTML viewer rather than the ActiveX one.

Unity: This is a library for doing dependency injection in .Net. You probably don’t need to use this directly, but it’s useful to understand how your DLLs are being loaded and why the startup process works like it does.


This was a quick list of the various tools and technologies we used to create our new Web UIs. Hopefully it gives you a starting point of things to start learning about, if you are interested in Sage 300c development.

Written by smist08

September 19, 2015 at 4:33 pm

Bengaluru Travel Blog Part 4

with one comment


As part of developing all the Web Screens for our upcoming Sage 300 2016 release, we worked with quite a few contractors at Sonata in Bengaluru, India. I originally visited them back in November 2014 and wrote a series of three blog articles on my experiences over there (part 1, part 2 and part 3). I then visited them again in March 2015, but didn’t blog about that visit. Now I’m in Bengaluru again and thought I’d add another posting to the series.


One change is that I’m going to try to use the proper name of the city which is now Bengaluru and not Bangalore. The name was changed just days before my first visit and was a bit confusing.

The Story of Sage 300c

We started the Sage 300c project two years ago, built on a lot of the ideas and architecture from the previous Orion project. We brought in Sonata for their expertise in Microsoft ASP.Net MVC technology which we adopted for the new Web UIs. We started work collaborating with a small team from Sonata to produce a proof of concept where we produced fully working A/P Vendors and A/P Invoice Entry screens. We chose these as reasonably complex but not so complex they would take too long to develop. We learnt a lot from this POC and used that to build a frame work for our new UIs. We then built up the team and proceeded to build the G/L screens. This was a test of building a full application to get a better idea of the work and time that would be involved when we ramped up for the whole project. This went quite well and we ramped up the team and started work on A/R, A/P, Bank, Tax and C/S. We then decided to accelerate the project and ramped up the team in Bengaluru again to simultaneously work on I/C, O/E and P/O. I blogged a bit about this process on how to organize Agile development and how to scale Agile development.

We are now code complete on Sage 300 2016 and just finishing final regression ready for release. The I/C, O/E and P/O screens are coming together nicely ready for our February Product Update. Any large software development project takes lots of hard work, many long hours and some heroic troubleshooting. This project was no different. Looking back now its amazing how much commitment to producing a first class quality product went into all the work. All the Agile Scrum teams around the world really took their work seriously and really made the effort to produce something everyone could be proud of.

Team Wrap Up

With this visit we’re wrapping up the giant accelerated project, and with the main Accounting modules completed we’re proceeding on a smaller scale. It’s interesting to see this transition while in Bengaluru at Sonata. The skills used on this project are in high demand and everyone moving off this project has a place on a new project. People are excited to both complete this project and to start their new project. Overall Sonata is expanding with a new building opening next door, next month.



This Sonata office is located in the Global Village Tech Park. There are a lot of large companies similar to Sonata located here. It is really remarkable how all these companies are continually managing ramping up and winding down so many large projects with so many people involved.


Further there are 2.97 million IT professionals in India and 35% of them are located in the Bengaluru area. This means the out of the total population of 8.52 million, 1,039,500 are IT professionals (i.e. programmers). This is an amazing number of computer pros and what is helping drive Bengaluru’s annual growth rate of 38% which has propelled it to become India’s fourth largest city.


As I leave Bengaluru, on one hand its sad to say good bye to so many people I’ve worked with over the last two years, on the other hand its exciting that they are all moving on to other projects. Hopefully I’ll run into them again in a future visit. Meanwhile with the core Accounting screens completed, Sage 300c has a solid Web technology base and can move on to really adding to the base we’ve created.

P.S.: Plus the people I was working with took me to Bannerghatta National Park where we went on a Safari and saw lots of tigers, bears, lions and elephants.


Written by smist08

September 13, 2015 at 3:42 pm

The Sage 300 2016 KPIs

with 8 comments


The new Sage 300 Home Page provides a nice launching point for running your new Web based Sage 300 Accounting screens. It also provides a Home view where you can choose to display up to six KPIs out of a palette of twelve.


The twelve KPIs give a good selection of things from G/L, A/R and A/P since these are the accounting screens we are including with the first release. Then there will be more KPIs with the second release which includes the I/C, O/E and P/O screens and matching KPIs.

Some people love KPIs, others just find them a nuisance. Using the KPIs is entirely optional, it’s up to you to select what you wish to see. The KPIs are controlled by Sage 300 security, so if you don’t have rights for a KPI, it won’t be available to display.


Many of the KPIs have settings dialogs that you open from the hamburger menu. For instance below is the one for the Account Balances KPI where you choose the five accounts to show the balance for.


You can also edit the title of each KPI. You can re-arrange them on the screen using drag and drop. For KPIs with an associated report, there is another menu item on the hamburger menu that will open the report.

Technical Details

When we developed these, although I couldn’t blog on what we were working on, I did blog on some of the technical aspects that went into how these were implemented using CSQRY and then on caching and calculating these. For this on premise release, we aren’t implementing any of the cloud based technologies that would calculate these for you in the background. Instead we calculated these the first time you access them in a day, and then cache the result for the rest of the day. Most people open and close their browser pretty frequently so we want it to be quick. Of course you can select refresh from a given KPI’s hamburger menu to recalculate the data.

We had similar data widgets in our Sage 300 6.0 Portal, these new KPIs leverage what was developed there as well, for instance to display aging or to categorize financial data.


KPIs are a good way to see information relevant to your job quickly when you log in. Often you can use this information to decide what you need to do next, or to just keep your finger on the pulse of your business.


Written by smist08

September 6, 2015 at 11:05 am