Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hello all,
I'd like to add revised "Changeables" to resulting item of the activity automatically.
It seems that there is only getChangeablesAfter() method in ChangeHelper2.service. I can use the method to get the Changeables in resulting items, but there's no "addChangeablesAfter()" or something that can add business ojbects to the resulting items of the activity.
Does anyone know how to add Changeables to resulting items of the activity by API?
Your help will be really appreciated.
Thank you in advance.
Best Regards,
Kuo, Yen-ting
Thanks David!
I found the APIs to add the resulting objects by the clue you gave.
I post the examples code here for sharing to all as following:
public static void addChangeablesToResultingItem(Vector vector, WTChangeActivity2 ca2)
{
Class class1 = null;
ChangeRecord2 changerecord2 = null;
try
{
class1 = Class.forName("wt.change2.ChangeRecord2");
vector = ChangeHelper2.service.storeAssociations(class1, ca2, vector);
changerecord2 = (ChangeRecord2)vector.firstElement();
vector = ChangeHelper2.service.saveChangeRecord(vector);
}
catch(Exception e)
{ ... }
}
If anyone want this function, you can refer to this example.
HI Hiko,
is it possible to Revise all the objects from affected to resulting, Instead of collecting them from the collector, where it will fetch all the Related CAD,Documents etc.
Please let me know if you have found this use case.
Thanks