Creating URL links for Sage X3 functions in visual processes

The visual process editor is a component that can be used:

  • To draw pictures and their background
  • To create links to other pages by defining links on elements

You can define most links in the visual process editor using a specific link type in the link dialog opened from an element's toolbar, but you can also create links by using the URL link type. You need to follow some rules to create the relevant URL according to the type of link you want to generate. This document explains how to code these URL links.

Links to X3 functions (class and representation mode)

  • A link is defined by a class, a representation, a facet, and, optionally, a key.
  • The classes and representations are defined in the corresponding dictionaries in Sage X3.
  • When the key is not specified, the URL is formatted as follows:
    {$baseUrl}/CLASS?representation=REPRESENTATION.$facet
    With CLASS being the class code, REPRESENTATION being the representation code, and $facet being the facet ($query).
  • When the key is specified, the URL is formatted as follows:
    {$baseUrl}/CLASS('key_value')?representation=REPRESENTATION.$facet
    With CLASS being the class code, key_value being the key value, REPRESENTATION being the representation code, and $facet being the facet ($details or $summary). If the key value is based on several components, values are separated by a tilde (~).

Examples

  • Access to the query for a representation and a class (ITMMASTER, for example)
    {$baseUrl}/ITMMASTER?representation=ITMMASTER.$query
  • Access to the detail of a table definition (the entity is ATABLE, and the key is BPCUSTOMER)
    {$baseUrl}/ATABLE('BPCUSTOMER')?representation=ATABLE.$details
  • Access to the summarized view of a cost accounting dimension (the key is the dimension type and the dimension)
    {$baseUrl}/CACCE('CCT~COMM-001')?representation=CACCE.$summary

Links to administration functions

  • A link is defined by a class, a representation, a facet, and, optionally, a key.
  • You can use a standard menu to get the URL and retrieve the CLASS and REPRESENTATION codes. For Syracuse, CLASS is the plural form of the entity name, and REPRESENTATION is the singular form of the entity name. For example, users and menuItems would be class names, while user and menuItem would be representation names.
  • When the key is not specified, the URL is formatted as follows:
    /sdata/syracuse/collaboration/syracuse/CLASS?representation=REPRESENTATION.$facet
  • When the key is specified, the URL is formatted as follows:
    /sdata/syracuse/collaboration/syracuse/CLASS('key_value')?representation=REPRESENTATION.$facet
  • Keys are always UUIDs for administration functions. If you want to create such links, you have to go to the page, copy the URL from your browser, and paste the URL's portion that starts with /stdata.
  • If you have direct access to some pages, you can also add option &where=(property like 'xxx'), where xxx is a pattern that usually includes % as a wildcard. Make sure you escape % by writing it %25. For example, /sdata/syracuse/collaboration/syracuse/menuItems?representation=menuItem.$query&where=(statName like 'VEN%25') displays the list of menu items associated with a statistical code starting with VEN.

Examples

  • Access to the users query:
    /sdata/syracuse/collaboration/syracuse/users?representation=user.$query
  • Access to the guest user definition (make sure each entity key has a unique ID):
    /sdata/syracuse/collaboration/syracuse/users('858cd6ac-558f-436a-b8ae-8884c1f44492')?representation=user.$details
  • Access to the user list for all users having a last name containing MARTIN:
    /sdata/syracuse/collaboration/syracuse/users?representation=user.$query&where=(lastName like '%25MARTIN%25')

Links to X3 queries

The URL is formatted as follows:

{$baseUrl}/QUERY('query_code')?representation=QUERY~query_code~level.$facet

With QUERY~query_code~level being the break level used to define the columns that appear. The facet is $query.

Additional parameters can be added with syntax &parameter=value. The level is usually 1, meaning it displays the first level of grouping. The level where the data is read is &level=x. It might be different from the level used to define the columns to display.

&displayLineNum=true and &forcedExecution=true are examples of parameters that can be used.

If ~level is omitted in the QUERY~query_code~level syntax, the graph does not display. &cube=false must be added to the request URL to have a flat mode for statistics. It can be useful if you want to export all the lines to Excel.

Refer to this page to see all the options.

Example

  • Access to the MYREQ request in cube mode
    {$baseUrl}/QUERY('MYREQ')?representation=QUERY~MYREQ~1.$query&count=20&level=1&cube=true

Links to X3 statistics

The URL is formatted as follows:

{$baseUrl}/STATS('stat_code')?representation=STATS~stat_code.$facet

With STATS~stat_code being the code of the statistic defined by stat_code. The facet is $cube.

Additional parameters can be added with syntax &parameter=value.

Refer to this page to see all the options.

Example

  • Access to the MYSTAT statistic for company code SAGE:
    {$baseUrl}/STATS('MYSTAT')?representation=STATS~MYSTAT.$cube&COMPANY=SAGE

Links to other visual process pages

The URL is formatted as follows:

{$baseUrl}/PROCESS('PROCESS_CODE')?representation=PROCESS~PROCESS_CODE.$facet

With $facet being the facet ($details). If the process code depends on the legislation, PROCESS_CODE can be PROCESS_CODE~LEGISLATION_CODE.

Examples

  • Access to the SALES process:
    {$baseUrl}/PROCESS('SALES')?representation=PROCESS~SALES.$details
  • Access to the ACCOUNT process for USA legislation:
    {$baseUrl}/PROCESS('ACCOUNT~USA')?representation=PROCESS~ACCOUNT~USA.$details

Links to classic pages

Links to classic page functions can also be defined using a URL. In this case, the syntax is the following:

  • When the function is object typed:
    {$baseTrans}/$sessions?f=FUNCTION/2//M/KEY_VALUE
    With FUNCTION being the function code and KEY_VALUE being the key value.
  • When the function does not require an additional value:
    {$baseTrans}/$sessions?f=FUNCTION
    With FUNCTION being the function code.

Examples

  • Access to the MARTIN customer code on a classic page:
    {$baseTrans}/$sessions?f=GESBPC/2//M/MARTIN
  • Access to the EXETRT function on a classic page:
    {$baseTrans}/$sessions?f=EXETRT