Fusion Manage Forum
Welcome to Autodesk’s Fusion Manage (formerly Fusion 360 Manage) Forum. Share your knowledge, ask questions, and explore popular Fusion Manage topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Scripting access to milestone does not work

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
sten
416 Views, 2 Replies

Scripting access to milestone does not work

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

 

Tags (2)
2 REPLIES 2
Message 2 of 3
plmadmin
in reply to: sten

Okay, solved my own problem.

It is item.milestones[index].workflowStateName.

Seems to be a problem with the online documentation....
Message 3 of 3
michelle.stone
in reply to: plmadmin

I'll put in a request to update the documentation - glad you got it sorted!

 

Michelle



Michelle Stone
Technical Marketing, PDM & PLM
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report