Forum Discussion
angela
8 years agoCatalyst II
Hi Chris,
while doing my tests yesterday after 10 minutes I came to the same conclusing as you. It looked easy to do, but wasn´t.
I had already begun customizing the ItemType when I discovered that the drop-down label feature is already implemented in the API, but just is not used. The missing label function just requires the modification of 3 lines of code and an additional array for the label.
Around line 9: Add label array, it must match to the ChangeItemList
this.ChangeItemLabels = top.aras.newArray("Simple MCO", "Express ECO", "Express DCO", "Magic Change");
Around line 40: Add handling of label list:
var changeItemLabel = this.ChangeItemLabels;
Around line 49: Change function call
//var option = this.AddOptionToDropDown(this.ChangeTypeInput, changeItemName);
var option = this.AddOptionToDropDown(this.ChangeTypeInput, changeItemName, changeItemLabel);
Around line 58: Change text to id
// var selectedType = this.ChangeTypeInput[this.ChangeTypeInput.selectedIndex].text;
var selectedType = this.ChangeTypeInput[this.ChangeTypeInput.selectedIndex].id;
Around line 153: Change text to id
// result.type = this.ChangeTypeInput[this.ChangeTypeInput.selectedIndex].text;
result.type = this.ChangeTypeInput[this.ChangeTypeInput.selectedIndex].id;
Somehow, that was even easier than rebuilding my ItemType...