cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Help with XML/Java for OIR

kpritchard
4-Participant

Help with XML/Java for OIR

Hi (Again),

We ran into userproblems because of Change Tasks (wtChangeActivity2) not being asearcheable type is "intended" functionality. As a result we've adopted a nomenclature of Numbering based onthe Change Notice(wtChangeOrder2) with a conter/index suffix. We currently have an OIR with manual numbering but this get's a bit circular with the default Change Task created with the Change Notice, and users need to guess what the new Number will be or "Submit Later" and go back and Rename. (inconvenient bordering on aggrevating either way).

So I can see that I'll need to update the OIR. I'm fairly sure I'll need to use the GetNumber() Method,but what to put in the paranthesis? I know it's not the PrimaryBusinessObject... that would be the Change Task (self). What is wtChangeOrder2 to wtChangeActivity2? Is it the ParentBusinessObject? Where does one find this? I looked over the JavaDoc but was unable to find anything.

1 REPLY 1

If I understand you, this code willl help.

//refString- windchill object oid

public static Persistable getObjectByRefString(String refString)

{
Persistable result = null;
try

{
ReferenceFactory refFact = new wt.fc.ReferenceFactory();
WTReference ref = refFact.getReference(refString);
result = ref.getObject();
}

catch (WTException e)

{
e.printStackTrace();
}
return result;
}

Announcements
Learn more about how we are using our browser poll here