Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Is there a way to add a list or table of affected objects to a change notice 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
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