<< Click to Display Table of Contents >> Navigation: Legacy Tools > User Info Filler > Configuring User Info Filler > Using JavaScript > References used in JavaScript |
References for functions available in formContext for Script and Submit actions
Fetching value from Form if column exists on the Form
if(listColumnsInfo.hasOwnProperty([ColumnInternalName])){
formContext.fetchColumnValueUI([ColumnInternalName])
}
Setting value back to Form only if column exist on the Form
if(listColumnsInfo.hasOwnProperty([ColumnInternalName])){
formContext.setColumnControlValueByName([ColumnInternalName],columnValue);
}
Fetching value from item in EditForm
if(listColumnsInfo.hasOwnProperty("Impact") && formContext.isEditForm){
var impactValue = currentItem.get_item("Impact");
}
Checking is Display Form and executing code
if(formContext.isDisplayForm){
// code goes here
}
Checking is Edit Form and executing code
if(formContext.isEditForm){
// code goes here
}
Checking is New Form and executing code
if(!formContext.isEditForm && !form Context.isDisplayForm){
// code goes here
}
For Submit action, setting the value for a column that is not displayed on the Form
var returnDataObj = {};
returnDataObj[[ColumnInternalName]] = valueforColumn;
functionCallback(false,returnDataObj);