Where to write the code?
Tell me please where to write the code https://www.ptc.com/en/support/article?n=CS150777 , tried many options, but failed nothing. Here is the code to add a table to the page
Description
How to add Promotion Objects to the Instructions field on the task's details page
User should see all the objects being promoted on the same page to avoid multiple clicks for navigating to the Promotion Objects page
How to add Promotion Target Objects in workflow Email Notification
Resolution
- Create global variable (say var of type String)
- Before activity add expression robot
- Append string to have all the promotion objects' numbers/names
- In activity create local variable
- Use that local variable in instructions
- Following code can be used to get the promotion target objects
wt.maturity.PromotionNotice notice = (wt.maturity.PromotionNotice)primaryBusinessObject;
wt.fc.QueryResult results = wt.maturity.MaturityHelper.service.getPromotionTargets(notice);
while (results.hasMoreElements())
{
obj = results.nextElement();
if (obj instanceof wt.doc.WTDocument)
{
var += obj.getName ()+“,”; // var is a global variable
}
}


