How to create links for Sage X3 functions in visual processes
The visual process editor is a flash component that was written in version 150. It will be replaced in the future by an HTML 5 editor. But in the meantime, it is usable without any modification:
Creating a link to other functions (administration functions, classes and representations, queries and statistic pages) is also possible by using the URL link; but you need to know the rules to follow for creating the relevant URL according to the type of link you want to create.
This document explains how to code these links.
The principles are the following:
When the key is not given, the format of the URL is the following:
{$baseUrl}/CLASS?representation=REPRESENTATION.$facet
In this URL, CLASS
is the class code, REPRESENTATION
the representation code, and $facet
the facet (here, it can only be $query
).
When the key is given, the format of the URL is the following:
{$baseUrl}/CLASS('key_value')?representation=REPRESENTATION.$facet
In this URL, CLASS
is the class code, key_value
is the key value, REPRESENTATION
the representation code, and $facet
the facet (here, it can only be $details
or $summary
). If the key value is based on several components, the component values are separated by ~
.
The same type of URL link is used, but CLASS
is QUERY('query_code')
and REPRESENTATION
is QUERY~query_code~level
, where the code of the query is defined by query_code
and the break level used to define the columns that appear is given by level
. The facet is $query.
Additional parameters can be added with the syntax ¶meter=value
. Level is usually 1 (this displays the first level of grouping). The level where the data is read (it might be different from the level used to define the columns to display) is given by &level=x
Typical parameters usable here are, for example:
&displayLineNum=true
&forcedExecution=true
If ~1 is omitted in the representation=QUERY~MYREQ~1
syntax, the graph does not display. To have a “flat mode” for statistics (useful to export all the lines to Excel), the following parameter must be added to the request URL:
&cube=false
The other options can be found here.
The same type of URL link is used, but CLASS
is STATS('stat_code')
and REPRESENTATION
is STATS~stat_code
, where the code of the statistic is defined by stat_code
. The facet is $cube.
Additional parameters can be added with the syntax ¶meter=value
.
The options can be found here.
The link is the same as for a Syracuse function, with the following characteristics:
* The class is PROCESS('PROCESS_CODE')
* The representation is PROCESS~PROCESS_CODE
* The facet is $details
* If the process code depends on the legislation, PROCESS_CODE
can be given in the format PROCESS_CODE~LEGISLATION_CODE
CLASS
and REPRESENTATION
codes can be found by using a standard menu to get the URL. The normalization for Syracuse is that the CLASS
is the plural name of the entity in initial caps, while the REPRESENTATION
is the singular name. For example, users
as class and user
as representation, menuItems
as class and menuItem
as representation./sdata/syracuse/collaboration/syracuse/CLASS?representation=REPRESENTATION.$facet
/sdata/syracuse/collaboration/syracuse/CLASS('key_value')?representation=REPRESENTATION.$facet
Note that on the administration function, the keys are always UUIDs. If you want to create such links, it is best to first go to the page, copy the URL from your browser, and just copy the portion of the URL that starts with /stdata. Another way is to have a direct access to some pages and add the option &where=(property like 'xxx') where xxx is a pattern that usually includes % as a wildcard (the % must be discarded as %25).
Let's consider for instance, the following link:
/sdata/syracuse/collaboration/syracuse/menuItems?representation=menuItem.$query&where=(statName like 'VEN%25')
This link displays the list of menu items associated with a statistical code starting with VEN.
The link on a classic function can also be defined as an URL. In this case, the syntax is the following:{$baseTrans}/$sessions?f=object_function/2//M/key_value
for an object typed function.{$baseTrans}/$sessions?f=function
for a function that does not require an additional value.
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
, 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
Access to the request MYREQ in cube mode
{$baseUrl}/QUERY('MYREQ')?representation=QUERY~MYREQ~1.$query&count=20&level=1&cube=true
Access to the statistic MYSTAT for the company code SAGE:
{$baseUrl}/STATS('MYSTAT')?representation=STATS~MYSTAT.$cube&COMPANY=SAGE
Access to the process SALES:
{$baseUrl}/PROCESS('SALES')?representation=PROCESS~SALES.$details
Access to the process ACCOUNT for USA legislation:
{$baseUrl}/PROCESS(' ACCOUNT~USA ')?representation=PROCESS~ACCOUNT~USA.$details
Access to the query for the users:
/sdata/syracuse/collaboration/syracuse/users?representation=user.$query
Access to the guest user definition (make sure the key is a unique ID for such an entity):
/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')
Access to the customer code MARTIN in classic page:
{$baseTrans}/$sessions?f=GEBPC/2//M/MARTIN
Access to the function EXETRT in classic page:
{$baseTrans}/$sessions?f=EXETRT