CA Service Management

CA SDM::.SPEL::. logf(level, format, ...) 

Feb 24, 2017 03:10 PM

Overview

Overview Spell function converting string to a lowercase (coverts all characters in string to lowercase)

Usage

<source lang="javascript"> string downcase(string attr); </source> attr - any string Results Returns converted string. Examples <source lang="javascript"> if(downcase(option_value) == "yes" ) { option_value="Yes"; } else if (downcase(option_value) == "no") { option_value="No"; } </source> source: Downcase - SDU

Results

 

Examples

 

logf(ERROR, "get_access_for_contact failed %s",msg[0]);

 

logf(ERROR, "get_func_access failed %s",msg[0])

get_func_access 

 

 

logf

 

Overview

This method Reads data from s and stores them according to parameter format into the locations given by the additional arguments

Functions that will allow to get some basic info about logged in user from the spell code. Since spel code from triggers is run under supervisor account this information allows to get security information (e.g. function acces level) and enforce constrains manually.

 

CA SDM Log file Levels: SIGNIFICANT, WARNING, ERROR or FATAL.

 

 

Example code:

ss

logf(SIGNIFICANT, cnt::get_login_user_role_name());

 

logf(SIGNIFICANT, cnt::get_login_user_interface_type());

 

logf(SIGNIFICANT, cnt::get_login_user_grant_level());

 

logf(SIGNIFICANT, cnt::get_grant_level_string_val(cnt::get_login_user_grant_level()));

 

 

Example built by Gutis

 

 

Where can I find Spel functions documentation? 

Statistics
0 Favorited
18 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.