Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
[Windchill root]\codebase\wt\clients\library\api \index.html
This will helps answer a lot of questions such as this one it also allows you tet get and set much more(need date, Description and etc.)
Also you can place the number in a task after you implement the above posted code. The power point attached walks you through how to do this on a CR but can be followed for CN\CT also. This may help give you some good ideas or jumping off points for your need.