admin 发表于 2018-8-1 13:46:23

【Aras二次开发】获取下一个流程状态



Technique
Use theItem.getNextStates()method to get the next state values.This recipe
assumes there is a select input field on the form for us to populate with state values.
HTML
<select id="mySelect"></select>
JavaScript
var results = document.thisItem.getNextStates();
var nextStates = results.getItemsByXPath('//Item[@type="Life Cycle State"]');
var count = nextStates.getItemCount();

var oSelect = document.getElementById('mySelect');
for (var i=0; i<count; ++i) {
var item = nextStates.getItemByIndex(i);
var opt= document.createElement('option');
opt.text = item.getProperty('name');
oSelect.add(opt);
}

页: [1]
查看完整版本: 【Aras二次开发】获取下一个流程状态