I can't figure out what I am doing wrong.
I have an item with 2 milestones.
I try to find a specific milestone by earching though the workflowStateNames:
var match = -1;
for (index = 0; index < item.milestones.length; ++index) {
if(item.milestones[index].workflowState.workflowStateName === "[98] Expired") {
match = index;
}
}
However, when I try it fails because (item.milestones[index].workflowState) is null.
The online scripting reference says:
item.milestones[i].workflowState.workflowStateName (string)
Name of the workflow state associated with the specified milestone in the array (as entered in Workflow Editor State Properties).
Is the documentation out of date?
I don't have a problem with item.milestones[index].milestoneDate
Solved! Go to Solution.
Solved by plmadmin. Go to Solution.
I'll put in a request to update the documentation - glad you got it sorted!
Michelle