How to set affected item’s p3 value with action menu button
I have append a sync button in action menu, use senerio as follow:
When user click this button, then get affected item from currently ECO, then set those items P3 value throught redline mode.
import com.agile.api.*;
import com.agile.px.*;
import com.agile.agileDSL.ScriptObj.IBaseScriptObj
import com.agile.agileDSL.ScriptObj.AgileDSLException
void invokeScript(IBaseScriptObj obj) {
obj.logMonitor(“Starting…”);
IObjectEventInfo event = obj.getPXEventInfo();
IDataObject dataObject = event.getDataObject();
if (dataObject instanceof IChange) {
IChange ctxChange = (IChange) dataObject;
ITable tableAI = ctxChange.getTable(ChangeConstants.TABLE_AFFECTEDITEMS);
for (Iterator iter = tableAI.iterator(); iter.hasNext();) {
IRow row = iter.next();
String site = row.getValue(ChangeConstants.ATT_AFFECTED_ITEMS_SITES)?.toString();
if (“”.equalsIgnoreCase(site)) {
IItem rlItem = row.getReferent();
String getValue = rlItem.getValue(1542)?.toString();
rlItem.setRedlinedValue(1592, getValue);
}
}
}
obj.logMonitor(“Finished…”)
}
After click button generated an eror message:No signature of method: com.agile.api.pc.item.Item.setRedlinedValue() is applicable for argument types: (Integer, String) values: [1592, AAA]
I hope some body can help me, I want to know how to fix this issue, or maybe Agile havn’t support redline throught API to update affected items P3 value.