Forum Discussion
Zahar_Chernov
8 years agoCreator II
replace {itemID} with the id of your Item
Item wfObj = this.getInnovator().newItem("Workflow", "get");
wfObj.setAttribute("select", "keyed_name, source_type(name, keyed_name), source_id,related_id(*)");
wfObj.setProperty("source_id", {itemID});
wfObj = wfObj.apply();
Item wfpObj = (!wfObj .isError()) ? wfObj .getRelatedItem() : null;