How to get value of Lifecycle phase of part where attribute is “REV.RELEASE_TYPE” ? in java
Hi Mayur,
Are you trying to get the lifecycle phase of BOM-Items ? You can elaborate the question.
If your requirement is to get Lifecycle phase you can use the below code.
You can use the below code for reference.
IItem item = (IItem) m_session.getObject(IItem.OBJECT_TYPE, “711-021263”);
String lifecycle = item.getValue(ItemConstants.ATT_TITLE_BLOCK_LIFECYCLE_PHASE).toString();
System.out.println(lifecycle);
ITable bomTable = item.getTable(ItemConstants.TABLE_BOM);
Iterator<?> myIter = bomTable.iterator();
while (myIter.hasNext()) {
IRow m_row = (IRow) myIter.next();
String life = m_row.getCell(ItemConstants.ATT_BOM_ITEM_LIFECYCLE_PHASE).toString();
System.out.println(
“Lifecycle of bom ” + m_row.getValue(ItemConstants.ATT_BOM_ITEM_NUMBER) + ” is ” + life);
}
Regards,
Arif