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

Add affected objects list to email notification

Highlighted
Participant

Add affected objects list to email notification

Is there a way to add a list or table of affected objects to a change notice email notification?

1 REPLY 1

Re: Add affected objects list to email notification

You can create helper class which will return  list of affected object in String format  and add string in activity instruction or in Email notification robot.

Refer below thread for details

https://www.ptcusercommunity.com/message/392638#392638

Below is sample code to get list of affected objects in String.

  public static String getAffectedObjectString( WTChangeOrder2 notice throws  WTException { 

 

 

  String affectedList="";

  

  QueryResult resulting = ChangeHelper2.service.getChangeablesBefore(notice);

  while (resulting.hasMoreElements()) { 

  Object object = (Object) resulting.nextElement(); 

  

   if (object instanceof WTPart   ){

  

   WTPart part=(WTPart)object;

   affectedList+=part.getNumber()+"<br/>";

  

   }else if (object instanceof WTDocument   ){

  

   WTDocument document=(WTDocument)object;

   affectedList+=document.getNumber()+"<br/>";

  

   }else if (object instanceof EPMDocument   ){

   EPMDocument epmDocument=(EPMDocument)object;

   affectedList+=epmDocument.getNumber()+"<br/>";

   }

  }

  return affectedList;

   

 

 

        }  

 

Hope it helps

Thanks

Shreyas

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________ Check out the Windchill Tips Board! We're talking about Whirlpool's use of digital twin, augmented reality, and data-driven design!

The NAVIGATE WORKING GROUP is here! Come innovate with PTC!

Sign up for a Working Group