1 Ax.ext.system
Class Ax.ext.system
Method Summary
Modifier and Type
Method
Description
object
Returns a mailer object configured with the SMTP host and credentials corresponding to user group of the user which running the script
array
getGroupUsers(string roles)
Returns an array of maps containing the user code and name from all users in the same group as the user running the script
string
getApiKey(string keyType)
Returns the api key stored in wic_conf.
string
Returns the name defined in wic_node_servers.
string
Returns the name defined in wic_node_servers.
string
Returns the physical name of the configuration database.
Method Detail
Ax.ext.system.getGroupMailer
-
object Ax.ext.system.getGroupMailer()
- Info:
-
Returns a mailer object configured with the SMTP host and credentials corresponding to user group of the user which running the script - Returns:
- object
Example
Copy
var mail = new Ax.mail.MailerMessage(); mail.from("info@deister.es"); mail.to("customer@acme.com"); mail.subject("Hello world"); mail.setText("Hello world!\nBye."); var mailer = Ax.ext.system.getGroupMailer(); mailer.send(mail);
Ax.ext.system.getGroupUsers
-
array Ax.ext.system.getGroupUsers( string roles )
- Info:
-
Returns an array of maps containing the user code and name from all users in the same group as the user running the script - Parameters:
- roles - Roles for which joined groups should be included
- Returns:
- array
Example
Copy
for (let user of Ax.ext.system.getGroupUsers()) { console.log( user.user_code, user.user_name) } for (let user of Ax.ext.system.getGroupUsers('booktool', 'app')) { console.log( user.user_code, user.user_name) }
Ax.ext.system.getApiKey
-
string Ax.ext.system.getApiKey( string keyType )
- Info:
-
Returns the api key stored in wic_conf. The no argument call returns the google maps key - Parameters:
- keyType - The type of key
- Returns:
- string
Example
Copy
let keyMaps = Ax.ext.system.getApiKey() // return MAPS key let keyMaps2 = Ax.ext.system.getApiKey(Ax.ext.system.ApiKey.MAPS) let geocode = Ax.ext.system.getApiKey(Ax.ext.system.ApiKey.GEOCODE) let keyRoutes = Ax.ext.system.getApiKey(Ax.ext.system.ApiKey.ROUTES) let keyTranslate = Ax.ext.system.getApiKey(Ax.ext.system.ApiKey.TRANSLATE)
Ax.ext.system.getServerExtranetName
-
string Ax.ext.system.getServerExtranetName()
- Info:
-
Returns the name defined in wic_node_servers.host_extranet_name for the current server. - Returns:
- string
Example
Copy
return Ax.ext.system.getServerExtranetName()
Ax.ext.system.getServerIntranetName
-
string Ax.ext.system.getServerIntranetName()
- Info:
-
Returns the name defined in wic_node_servers.host_intranet_name for the current server. - Returns:
- string
Example
Copy
return Ax.ext.system.getServerIntranetName()
Ax.ext.system.getWicConfPhysicalCode
-
string Ax.ext.system.getWicConfPhysicalCode()
- Info:
-
Returns the physical name of the configuration database. - Returns:
- string
Example
Copy
return Ax.ext.system.getWicConfPhysicalCode()
wic_conf