SystemConstant
SystemConstant object allows users to get and set user system constant values. Besides getting or setting a system constant value, a user can create a new system constant with this object by placing the new keyword in front of the object. In the DEACOM scripting tree, whenever you see a branch called .Constructor, in the actual script, you will replace this with the keyword new.
Unless you are on a version of DEACOM that includes Session.Variables, the only way to pass information from one form to another in DEACOM via scripting, except where Event.Form.Parent is allowed, is to use a system constant.
Applies To
None
Properties and Methods
Methods
Available
The SystemConstant object is available in:
- 15.03.090
- 15.04.059
- 15.05.034
- 16.00.039
- 16.01.011
- 16.02.004
- 16.03.001
- All newer builds
Type
Object
Syntax
SystemConstant;
Parameters
None
Example
//--The following example show how you can create a new SystemConstant object
//--In the scripting tree in DEACOM, these are the 'Constructor' options
var loConstant = new SystemConstant;
loConstant.co_name = 'js_New_Example'; //--whenever you create a new system constant via scripting, we recommend starting it with js_
loConstant.co_active = false; //--whenever you create a new system constant via scripting, we recommend making it inactive (you can still interact with an inactive system constant via scripting)
loConstant.co_notes = 'This is a note stored in a system constant';
loConstant.Save(); //--save all changes to system constant. Any change to a system constant will produce a dxmod entry in DEACOM, even through scripting.
/* Expected Prompt Response:
The system constant js_New_Example was created with a note of 'This is a note stored in a system constant'
*/