Api ASYRFNC.AGET_ASYRURL

This function returns a URL that accesses a class or representation page. The URL can be a full URL (used when the link is triggered from an external document such as an email embedding the link), or only a resource URL (used when the URL is in a client page).

The parameters are described below:

CodeType and dimensionContents
CTXVariable Instance Using =[V]CST_C_NAME_CLASS_CONTEXTThe current context used (for error messages).
FULLURLValue IntegerFull URL ([V]CST_ATRUE or [V]CST_AFALSE)).
REPRESENTATIONValue CharThe name of the representation.
FACETValue IntegerThe facet used (can be [V]CST_AFAC_DETAILS, [V]CST_AFAC_EDIT, [V]CST_AFAC_QUERY, [V]CST_AFAC_LOOKUP, [V]CST_AFAC_SUMMARY).
TABKEYValue Array of CharList of the key segments for the entity.
TABKEYVALValue Array of CharValues corresponding to property names defined in TABKEY.
TABPARValue Array of CharAdditional parameter names that can be sent in the URL as parameters.
TABPARVALValue Array of CharAdditional parameter values corresponding to parameter names defined in TABPAR.
WURLVariable ClbfileThe result URL.

Example

CODECODE CODEsh# Let's create a URL that accesses a given BANK detail.Local Char TABKEY(50)(1..10),TABKEYVAL(50)(1..10),TABPAR(50)(1..10),TABPARVAL(250)(1..10)Local Char REPRESENTATION(30)Local Integer ASTATUS, FULLURLLocal Clbfile WURLREPRESENTATION = "ABANK"TABKEY(1)="CRY" : TABKEYVAL(1)="DE"TABKEY(2)="BAN" : TABKEYVAL(2)="69490000"FULLURL=[V]CST_ATRUEASTATUS = func ASYRFNC.AGET_SYRAURL(& GACTX,FULLURL,REPRESENTATION,[V]CST_ADETAILS,TABKEY,TABKEYVAL,TABPAR,TABPARVAL,WURL)# Let's imagine that the server address is http://my_server:8124, and the endpoint is MYFOLD# After the execution of AGET_SYRURL function, WURL contains the following value:# http://my_server:8124/syracuse-main/html/main.html?url=/api1/x3/erp/MYFOLD/ABANK('DE~69490000')?representation=ABANK.$detailsFULLURL=[V]CST_AFALSEASTATUS = func ASYRFNC.AGET_SYRAURL(& GACTX,FULLURL,REPRESENTATION,[V]CST_ADETAILS,TABKEY,TABKEYVAL,TABPAR,TABPARVAL,WURL)# Now, because FULLUSR is false, the result is:# /api1/x3/erp/MYFOLD/ABANK('DE~69490000')?representation=ABANK.$details

Api ASYRFNC.AGET_CLASSICURL

This function returns a URL that accesses a classic page.

The parameters are described below:

CodeType and dimensionContents
CTXVariable Instance Using =[V]CST_C_NAME_CLASS_CONTEXTThe current context used (for error messages).
FULLURLValue IntegerFull URL ([V]CST_ATRUE or [V]CST_AFALSE)).
FUNCTIONValue CharThe name of the function.
MODEValue IntegerThe mode used, that can be creation mode ([V]CST_ACREATIONFCT) or edit mode ([V]CST_AMODIFFCT).
TABKEYValue Array of CharList of the key segments for the entity.
TABKEYVALValue Array of CharValues corresponding to property names defined in TABKEY.
TABPARValue Array of CharAdditional parameter names that can be sent in the URL as parameters.
TABPARVALValue Array of CharAdditional parameter values corresponding to parameter names defined in TABPAR.
WURLVariable ClbfileThe result URL.

Example

CODECODE CODEsh# Let's create a URL that accesses a given BANK detail.Local Char TABKEY(50)(1..10),TABKEYVAL(50)(1..10),TABPAR(50)(1..10),TABPARVAL(250)(1..10)Local Char FUNCTION(30)Local Integer ASTATUS, FULLURLLocal Clbfile WURLFUNCTION = "GESABN"TABKEY(1)="CRY" : TABKEYVAL(1)="DE"TABKEY(2)="BAN" : TABKEYVAL(2)="69490000"FULLURL=[V]CST_ATRUEASTATUS = func ASYRFNC.AGET_CLASSICURL(& GACTX,FULLURL,FUNCTION,[V]CST_AMODIFFCT,TABKEY,TABKEYVAL,TABPAR,TABPARVAL,WURL)# Let's imagine that the server address is http://my_server:8124, and the endpoint is MYFOLD# After the execution of AGET_CLASSICURL function, WURL contains the following value:# http://my_server:8124/syracuse-main/html/main.html?url=/trans/x3/erp/MYFOLD/$sessions?f=GESABN/2//M/69490000~DEFULLURL=[V]CST_AFALSEASTATUS = func ASYRFNC.AGET_CLASSICURL(& GACTX,FULLURL, FUNCTION,[V]CST_AMODIFFCT,TABKEY,TABKEYVAL,TABPAR,TABPARVAL,WURL)# Now, because FULLUSR is false, the result is:# /trans/x3/erp/MYFOLD/$sessions?f=GESABN/2//M/69490000~DE