In Sage X3 Version 7 and later, REST services are available to access various entities. These REST services return data in a JSON format, and can be consumed from .net. This post provide some .net examples of making REST requests to Sage X3, and parsing the data.
When consuming X3 web services from another platform, such as .net, an X3 user and password must be used to make the web services call. If the admin user in X3 is set up to call web services, the password by default is blank. This means the user in the X3 web service call is admin, and the password is blank. This may cause several issues or concerns as far as security goes. First of all, you may want to use a user other than the admin user to make the web services calls. Second, you will likely want to use a password other than blank.
If you have created a new user in X3, and defined it as a web services user, and attempt to use that newly created user and password combination to call the web service, you will likely find that the call fails. The reason is, the web service is making the call at the folder level, and the user/password defined when the user was created is not the user/password combination the web services layer is using to validate the user.
There were several changes to the way classic SOAP web services work in X3 Update 9. One change is the elimination of the web service tester from the browser. Details on this are in my blog post on Testing X3 SOAP Web Services in Update 9.
Another change is how classic SOAP web services are consumed with .net. This blog summarizes some of the bumps I encountered while trying to prepare .net applications to consume X3 web services in Update 9.
The first change is the wsdl file that is referenced in the .net project. In previous versions of X3, the wsdl was added to the project as a Web Reference, using a format similar to below:
The new wsdl url is now in the following format:
This can also be found by going to the SOAP Generic Web Services option under Administration / Web Services.
Concur is a business travel and expense solution which allowed on line entry of travel expenses. The Concur interface to Sage 500 and Sage X3 can be used to automate the import of expense reports to Accounts Payable and Project Accounting through a connector developed by RKL eSolutions.
- Manual Integration – Through this method, once the expense files are processed and generated in Concur, the user logs onto the Concur site and manually downloads the file for processing. The file can then be imported using the RKL Concur connector.
- FTP Integration – This is one of two ways to automate the integration between Concur and Sage 500 or Sage X3. Concur provides an ftp option, where the generated expense files are placed onto an FTP site where an outside application can pick them up for automatic processing into Sage 500 or Sage X3.
- Web Services Integration – At an additional cost, Concur provides a web services connector, which provides various functions, including pulling generated expense files from the Concur system. These files are then imported to Sage 500 or Sage X3.
While doing using the Sage ERP X3 data import process, it is important that the data columns and line feeds match up exactly with what X3 is expecting. If the end of line indicators and/or field separators do not match the import specification, an error similar to below may be encountered.
It is important that the separators and record separator values match the import definition.
Although the file may visually appear to match the template when opening it, there may be issues with the line feeds or separators. For example, when opening the import file from above in Excel, the file appeared to be formatted correctly. The number and type of data columns matched the import template, and the line-feeds appeared to be set properly. If the file was opened with Notepad, however, the line feeds did not appear.
In this particular example, the data file to be imported was generated from a VB script process, and the line feeds were added at the end of each row. The issue was, the text file had a line fedd (ascii char 10), but no carriage return (ascii char 13). The way to resolve the issue above is to make sure the generated file has both a line feed and a carriage return, and the import will process successfully.
Another way to determine the issue is to make sure the import template is also marked as an export. Then do an export from the X3 table, and compare the data in the generated export file to the file trying to be imported to determine where the fields may be mismatched.
Entry Points in Sage ERP X3 provide a way to apply custom code into advanced processes without modifying or affecting the standard process. Standard Entry Points are provided within many processes where custom code can be called to perform custom actions, such as modifying custom tables or performing customized actions.
When using the Configurator in Sage ERP X3, the Automate configurator function (FUNCFGAUT) can be used to automatically generate configuration. This function can be called from an X3 process, which can then be exposed as a Web Service. In the scenario below, the configurator is used to generate configurations from an outside web site, create the Item, Bill of Material and Routing in Sage ERP X3, and add it to a sales order.
Data can be displayed in a grid format in Sage ERP X3 by adding a Table Block type to a screen. Using the Graph representation in a screen, this data can easily be displayed in a graph by creating graphs in Sage ERP X3 screens. Below are the steps for creating a Graph from table data on an Sage ERP X3 screen.