How to add specific site for SCO (Site change Order)?
Need sample code for:
Trying to create site change order and add item in affected items tab for new site (i.e. until now item does not have that site) and then create/modify mBOM. I am facing issue where/how I can add this site to SCO. Below is application behavior: If we are creating SCO from front end application we have to pass site for which we want to create it then we can add items on affected items tab and if those items are not yet associated with that site then system ask if want to continue with the assignment and it does it for us. |
Hi Vaibhav,
Please try the below code.
IChange change=(IChange) session.getObject(IChange.OBJECT_TYPE,”SCO00001″);
ITable affItems=change.getTable(ChangeConstants.TABLE_AFFECTEDITEMS);
session.disableWarning(517);
HashMap<Integer,String> map=new HashMap<Integer,String>();
map.put(ChangeConstants.ATT_AFFECTED_ITEMS_SITES, “Site1”);
map.put(ChangeConstants.ATT_AFFECTED_ITEMS_ITEM_NUMBER, “P00001”);
affItems.createRow(map);
Regards,
Karthik