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

We are happy to announce the new Windchill Customization board! Learn more.

Add affected objects list to email notification

rhermann
4-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

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

 

RE: Adding Promotion Objects to notifications - PTC Community

 

 

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

Top Tags