Screen-defined logical attributes are not persisted, and any initial value must be derived from other information such as a constant, global information, a default value, a value of another attribute, a JavaScript function, or left as blank.
To initialize a value, an optional JavaScript function can be added to the Initialization JavaScript text box of the Configure Standard Profile Screen. A FieldContext object is passed to the function when a field needs to be initialized.
The object can be used to set field values, as shown in the following code example:
function init(FieldContext){
var city = FieldContext.getFieldValue("City" );
var state = FieldContext.getFieldValue("State" );
var zip = FieldContext.getFieldValue("Zip" );
FieldContext.setValue( city + " " + state + " " + zip );
}
|
Copyright © 2014 CA.
All rights reserved.
|
|