How to documents
The following are some examples showing best practices to be adopted by development partners using the Sage X3 workbench.
Normalization
In this chapter, you will find the codification rules as well as the recommendations given to the developers producing standard, vertical and specific code in order to enhance the readability and to ease the future evolution of the code.
- Naming conventions
- Writing and running Sage X3 unit tests
- How to create read-only pages that replace V6 objects
Code examples
- CRUD example on 3 levels
- CRUD example on a version 6 "combined object"
- AXUNIT use: How to design a test case on a persistent class
V12 development examples
You will find here examples based on a real development made by a team experiencing the development techniques for V12.
- Property (Field) control:
- How to set an initial value for a property
- How to process child collection rows
- How to change the value of one property from an update to a different property
- How to make a property mandatory or optional from an update to a different property
- How to disable or make a property editable from an update to a different property
- How to hide or make a property visible from an update to a different property
- How to handle errors on interdependent fields
- Methods / Operations:
- How to change the properties of one data class from another data class using a standard Method
- How to change the properties of one data class from another data class using an Operation
- How to create data for a child class from another data class using an Operation
- How to use methods defined in other classes
- How to get information relating to the current context
- Representation (User interface) classes:
- How to add a filter to the Query facet
- How to modify the selections (Query facet) for a standard data table
- How to add columns to a standard Query facet
- How to filter rows in a standard Query facet
- How to add a URL to launch a web page
- How to add an image to a Representation class
- How to add a clob (text) to a Representation class
- How to use multiple ASETERROR methods in a single Representation class
- V12 client configuration:
- Development environment / Development techniques / Best practice:
- Best practice: Naming rules
- Best practice: Data classes
- Best practice: Representation classes
- Best practice: Developing processes
- Best practice: Methods and operations
- Best practice: Grouping your development work
- Best practice: Avoid unnecessary Order By on SQL requests
- How to create and run an automatic unit test on a data class
- How to work with collections using AXUNIT
- How to install Eclipse and use it to debug Version 7 code
V12 development techniques
When switching to development in V12 native developers, experienced in V6 development techniques, must adjust their coding methodology. It is therefore CRITICAL to read and understand ALL of the following details and advice on correct practice:
INTRODUCTION: READ THIS CAREFULLY
- Data classes / Representations:
- Class definition elements to include or exclude
- Data values used for a table's primary index must not change
- Avoid data duplication in a class
- When code should be stored at the data class level and when at the representation level
- Use of child classes versus references
- Controlling the user interface on a mobile representation
- Methods and operations:
- Processes and best practice:
- Avoid using global variables
- Define your variables as local
- Use constants to keep code readable
- Handling void values in function parameters and return values
- Always follow template script structures
- Error handling on properties via methods
- Error management in version 7
- Checking class context in scripts
- Closing tables
- New supervisor library functions to use
- When V6 code can be reused
- Constructing messages for improved localisation
- Handling or restricting the insertion of lines into an array
- Handling or restricting the deletion of lines from an array
- Use of constants when testing return values
- Storing and managing images (BLOBs)
- Storing and managing text (CLOBs)
- Best practice for opening and closing tables
- Best practice for using the APARENT class property
- Best practice for controls on updated properties
- Best practice for propagating updates
- Best practice for handling collections
- Best practice when using snapshots
- Best practices for data transaction handling
- Best practices for updating a record if it exists otherwise creating a new one
- How to use filters with variables
- Best practices for objects with header/lines structure
Working in Classic mode with some external resources may need to use dedicated techniques. They are described here:
- Instructions and syntaxes no more usable in Classic code
- How to manage files in the storage area
- How to handle documents in Classic pages
- Classic functions and new pages cohabitation
Platform administration and tools
How to documents related to the platform administration are located here.
- How to set up Oauth2 authentication with a google account
- How to set up Oauth2 authentication with a microsoft account
- How to configure Syracuse for MongoDB X509 authentication
- How to use QR-codes in mail merge templates
- How to create an icon for a module
- How to transfer administration data
- How to duplicate a Syracuse server
- How to transfer mobile applications
- How to manage multiple http and https servers
- How to handle legacy passwords
- Strategies for mongoDB data transfer and administration
- Ensure the security of mongoDB
- Force the connection of a user on a dedicated server for a solution
- Comply with FDA regulations such as CFR 21-11
- Rename a server
- Installing several node servers