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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

ECR/ECN number

bwilson-2
4-Participant

ECR/ECN number

Hi all,

I have created a custom numbering sequence for my ECR's that has a prefix of "D-ECR-". I also set in oracle the starting number as 5000 and the increment as 1. Now the customer wants to set the ECN number as the same as the ECR with a prefix of "D-ECN-". I know this might be tough but I thought I would ask.

Brian

1 REPLY 1
avillanueva
22-Sapphire I
(To:bwilson-2)

I handle this from a workflow expression robot. You should run this as
soon as the ECN is created. Mine is a bit different where I am changing
the ECR number to match the ECN number but you should be able to reverse
this. Actually, I wrote this to manually change the numbers of existing
change objects.



wt.change2.WTChangeOrder2Identity ecnID =
wt.change2.WTChangeOrder2Identity.newWTChangeOrder2Identity((wt.change2.
WTChangeOrder2)primaryBusinessObject);

for( wt.fc.QueryResult queryresult =
wt.change2.ChangeHelper2.service.getChangeRequest((wt.change2.WTChangeOr
der2)primaryBusinessObject, true); queryresult.hasMoreElements();)

{

wt.change2.WTChangeRequest2 ecr =
(wt.change2.WTChangeRequest2)queryresult.nextElement();

wt.change2.WTChangeRequest2Identity ecrID =
wt.change2.WTChangeRequest2Identity.newWTChangeRequest2Identity(ecr);

System.out.println("ECN:"+ecnID.getNumber());

System.out.println("ECR:"+ecrID.getNumber());



ecnID.setNumber(newNumber);

ecrID.setNumber(newNumber);

wt.fc.IdentityHelper.service.changeIdentity(ecr,ecrID);


wt.fc.IdentityHelper.service.changeIdentity((wt.change2.WTChangeOrder2)p
rimaryBusinessObject,ecnID);

}

Make sure that you set the preference for a 1 to 1 relationship between
ECRs and ECNs. It's possible to have a number uniqueness conflict but
it would be rare. What your customer will find confusing as a result is
that when they search on an ECN number by number, they will return two
objects now. Unless they are trained, it is easy to confuse the ECR
from the ECN on the search results. They look similar and the only
difference is the icon.
Top Tags