Hello All,
I am working on a enhancement to drop reservations at FLDCOMP( which is a synonym of INPRG) if the item is not updated in acutals( means on plans tab user have added 4 lines type of item and on actuals tab he added only one), so i need to delete those 3 lines which are not required( but if i move the work order to COMP status, those will be dropped (due to a setting at ORG level). So far i tried with following code at workorder object level. It is working on some records and failing on some, and also getting record is updated by another user error some times as well.
Requesting experts help on this.
from psdi.server import MXServer
from psdi.mbo import MboConstants
if (onupdate==True and wostatus=='FLDCOMP'):
invresrSet = MXServer.getMXServer().getMboSet("INVRESERVE", MXServer.getMXServer().getSystemUserInfo())
invresrSet.setWhere("wonum = '"+mbo.getString("wonum")+"' and siteid='"+mbo.getString("siteid")+"' and ACTUALQTY=0")
invresrSet.reset()
if invresrSet.count()>0:
invresrSet.deleteAll()
invresrSet.save()
invresrSet.close()
#Inventory#Utilities------------------------------
Venkata Achanta
CCSI
------------------------------