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

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

Translate the entire conversation x

Add affected objects list to email notification

rhermann
12-Amethyst

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
satre-2
12-Amethyst
(To:rhermann)

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

Announcements
Top Tags