Hi Experts,
We are in Sourcing 10.0
We are implementing Service Master , from configurations side we have done the changes.
Now we have to write the script for - to change the item type from Material to Service in the case where a service master is added.
I have tried the code but it's not working:
ma_line_items = doc.getLineItems();
iter = ma_line_items.iterator();
while(iter.hasNext())
{
line_item = iter.next();
mat_obj = line_item.getMaterialObjRef();
matHome= IBeanHomeLocator.lookup(session, mat_obj).find(mat_obj);
if(matHome.getExtensionField("Z_Is_Service").get())
{
name=matHome.getDisplayName();
//line_item.setLineItemTypeEnum(LineItemTypeEnumType SERVICE);
line_item.setLineItemTypeEnum(new LineItemTypeEnumType(2));
}}
Can anyone help me on this
Any leads would be of great help!!
I am getting the the below error
Regards,
Geetika