Skip to main content
8-Gravel
October 28, 2024
Solved

change request affected objects

  • October 28, 2024
  • 1 reply
  • 1620 views

Version: Windchill 12.0

 

Use Case: While editing the Change Request adding new affected objects under select affected object, suppose there is 2 affected objects already present for the change request we are adding 1 new object.


Description:

The problem faced is while fetching these affected object through code using ChangeHelper2.service.getChangeables(changeRequest) inside editFormProcessor only able to get the 2 affected object, I need to check all the affected objects(existing + newly added) as well as just newly added object.

Best answer by d_graham

@NG_10595539 ,

You can't expect ChangeHelper2.service.getChangeables(changeRequest) to get the newly added objects because at this point in the process they are not added yet.  They are not linked to the CR at this point and therefore there is no link in the dB that getChangables() method can query.

 

BTW, can you tell us exactly what you are intending to check when checking the newly added objects?

1 reply

d_graham18-OpalAnswer
18-Opal
October 28, 2024

@NG_10595539 ,

You can't expect ChangeHelper2.service.getChangeables(changeRequest) to get the newly added objects because at this point in the process they are not added yet.  They are not linked to the CR at this point and therefore there is no link in the dB that getChangables() method can query.

 

BTW, can you tell us exactly what you are intending to check when checking the newly added objects?

8-Gravel
October 28, 2024

hi @d_graham ,
need to check newly added WTDocument for the affected object.

18-Opal
October 28, 2024

What does that mean?

WTDocuments don't have affected data.