Hello,
I am trying to load an item from the Project Management tab in a script via the dmsID of the linked task. I have tried using item.project.subTasks[1].target_id (as shown on the scripting help page), but the script returns that the value is undefined. Does anyone know how I can access the dmsID of this task?
Thanks in advance!
Hi Matt,
I have helped many customers linking the Task records to the Project Mangement Tab of the Project Management Workspace.
Basically
1) You have a WS - Project Management and you spawn a record in the WS - Task
2) Link the newly developed Spawn record from WS - Task back to the project managment tab of WS - Project Management.
See Attachments for reference
You will need to have 2 scripts
This script will be store in the Library - createNewItem
function createNewItem(baseItemName, newItemProperties){
newItem = createItem(baseItemName);
for(var propKey in newItemProperties){
newItem[propKey] = newItemProperties[propKey];
}
return newItem;
}
This script is an action script that will call the library SpawnTask_FromProject
if(item.SPAWN_TASK_WS !== null){
var newProperties = [];
newProperties.PROJECT_LINK = item.descriptor.descriptor;
createNewItem('WS_PM1_TASK_MANAGEMENT', newProperties);
if(newItem !== null){
item.SPAWNED_TASK_LINK = newItem;
}
}