Hi Again,
I seem to be finding all the bugs at the moment, although I hope I am wrong.
It doesn't look like I am able to create a new item through a script and Add It to the relationships tab at the same time
(Using the createNewItem library of course)
if(item.CREATE_CHANGE_ORDER === "Yes"){
var newProperties = [];
newProperties.LINKED_CAPA = item.descriptor.descriptor;
createNewItem('WS_UPGRADE', newProperties);
item.ASSOCIATED_CHANGE_ORDER = newItem;
item.relationships.addRelated(item.ASSOCIATED_CHANGE_ORDER,'Cross-Reference','Bidirectional','Link Change Order to CAPA');
}
each segment of the script works fine by itself however doesn't work together, my thought where I need to Add a delay to the item.relationship section however this didn't seem to help.
thanks again
James
Hi James. I too try decide this issue...
You get error (java.lang.RuntimeException: Unable to save script results) ?
P.S. Maybe this features not supported, like a "scrypting-based" change owner (before last update) ?
Hi James,
Maybe this would work?
if(item.CREATE_CHANGE_ORDER === "Yes"){
var newProperties = [];
newProperties.LINKED_CAPA = item.descriptor.descriptor;
var newItem = createNewItem('WS_UPGRADE', newProperties);
item.ASSOCIATED_CHANGE_ORDER = newItem;
item.relationships.addRelated(item.ASSOCIATED_CHANGE_ORDER,'Cross-Reference','Bidirectional','Link Change Order to CAPA');
Regards,
David.