Update attribute value in case of Event happening
Hello,
could someone share Script PX for updating an attribute Value in case of Event happening ?
thank you.
Hi Liran,
If you detailed your requirement then it would be more helpful for me to provide solution but I think below code helpful for you.
import com.agile.agileDSL.ScriptObj.IBaseScriptObj
// add other import statements here
import com.agile.api.ItemConstants
void invokeScript(IBaseScriptObj obj) {
oldItemDescription = obj.getValueByAttId(ItemConstants.ATT_PAGE_TWO_LIST14);
obj.setValueByAttId(ItemConstants.ATT_PAGE_TWO_LIST14, “Capital Item”);
newItemDescription = obj.getValueByAttId(ItemConstants.ATT_PAGE_TWO_LIST14);
obj.logMonitor( “Old description: ” + oldItemDescription + “| ” + “New description: ” + newItemDescription);
}
Thanks
priyanka