Need some scripting help

Need some scripting help

ThomasRambach
Advisor Advisor
590 Views
2 Replies
Message 1 of 3

Need some scripting help

ThomasRambach
Advisor
Advisor

See the attached PDF. I'm having some issues working through this logic and how to apply this efficiently as a FLC script. Any ideas?

 

 

0 Likes
Accepted solutions (1)
591 Views
2 Replies
Replies (2)
Message 2 of 3

tony.mandatori
Autodesk
Autodesk
Accepted solution

You have a few things working against you:

 

  1. The PM Tab takes a while to load in script.
  2. There is no way to add custom attributes to the link between project and task.

if Task 5 is dependent on Task 3, you may want to consider nesting your tasks to make the code a little easier, or eliminate task 5 altogether.

 

You can autocomplete the workflow using item.performWorkflowTransitionByCustomID('CUSTOM_ID', 'COMMENTS')

 

When completing the tasks, you can write back to the details page of the Product, and the final task can then check the product to see if it is the last one to complete - if it is, transition the parent.  You can use an integer for the number of tasks that need to be completed, and another to track the number of tasks completed.  When completing a task increment the "completed tasks" integer and check to see if there are no more tasks remaining.

 

0 Likes
Message 3 of 3

ThomasRambach
Advisor
Advisor

Thanks @tony.mandatori 

 

I'm going to try the integer count method to keep track of if the tasks are all completed.

0 Likes