Event PX to update lifecycle phase in affected items

Hi

Have a requirement to update lifecycle phase of a affected item based on a particular condition. When tried using update table event, without using event dirty methods, it updates but multiple events are triggered as seen in history and event handler monitor.

How to use dirty methods to update the lifecycle phase of an affected item of a change order?

Sabarish

Agile User Asked on March 14, 2022 in Agile PLM (v9).
Add Comment
1 Answer(s)

Hello

Please check SDK Developer Guide – Developing PLM Extensions

Example 5–10 Using IEventDirtyTable – it gives a good example of how to use UpdateTable and set dirty cells in BOM tab

You can follow similar approach for Affected items tab as well

– Raj

Agile Angel Answered on March 15, 2022.

Thanks for your reply Raj.

We were able to update other cells like REV with pre trigger. But for lifecycle phase cell ,with pre trigger it was not working.

With post trigger, it triggers multiple updates.

Any suggestion on how to resolve this?

Sabarish

on March 15, 2022.

Hi Sabharish

What error are you getting when you update lifecycle phase in pre trigger?

– Raj

on March 15, 2022.

Hi Raj

 

We were getting following issues ,one is that setValue did not work for dirty row, then the other method using setSelection was giving Invalid Parameter.

 

Thanks

Sabarish

on March 16, 2022.

We were able to resolve this.

We used the dirty cells in the  following approach .This works with pre trigger.

IEventDirtyRowUpdate row1 = (IEventDirtyRowUpdate)it1.next();

IItem daffItem = (IItem) row1.getReferent();

ICell LCcell = daffItem.getCell(ItemConstants.ATT_TITLE_BLOCK_LIFECYCLE_PHASE);

IAgileList NewLCvals = (IAgileList)LCcell.getAvailableValues();

//set the Affected Item New LC Phase value to xxx if the Item Type is xxx

//IAgileClass cls = LCcell.getAttribute().getListAgileClass();
ArrayList al = new ArrayList();
al.add(“xxx”);

Object[] ItemLCP = al.toArray();

NewLCvals.setSelection(ItemLCP);

row1.setCell(ChangeConstants.ATT_AFFECTED_ITEMS_LIFECYCLE_PHASE, NewLCvals);

on April 20, 2022.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.