您好,登錄后才能下訂單哦!
var tool = new ChangeRiskTool.createNew(); tool.calculateRisk(fields,SetRiskParse); var ChangeRiskTool = { createNew: function(){ var changeRiskTool = {}; changeRiskTool.calculateRisk = function(fields, callback){ var questions = _getQuestions(fields); var values = _getValues(fields); var ga = new GlideAjax('WKCDAChangeUtil'); ga.addParam('sysparm_name', 'calculateRisk'); ga.addParam('sysparm_questions', questions); ga.addParam('sysparm_values', values); ga.getXML(callback); }; _getQuestions = function(fields){ var questions = []; for(var i=0; i<fields.length;i++){ questions.push(g_form.getLabelOf(fields[i])); } return questions; }; _getValues = function(fields){ var values = []; for(var i=0; i<fields.length;i++){ var choiceValue = g_form.getValue(fields[i]); if(choiceValue){ choiceLabel = g_form.getOption(fields[i], choiceValue).text; values.push(choiceLabel); } } return values; }; return changeRiskTool; }, };
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。