Workorder

Work order has follow structure

 

WorkOrder

 WorkorderPos

         WorkorderBoM

         WorkorderRouting

         WorkorderSerialNumberReservation

 

For Workordercreation you can define only the Workorder and WorkorderPos. The BoM and Routing is used from item master data

 

 

Post work order

You can create a work order only with definition of Work order positions. You can't define Bill of Material or Routing position, only the BoM/Routing Id

hmtoggle_plus1Example create work order

beasscript-logo-small

 

instance bsl b
b.post=Workorder={"WorkorderPos":[{"ItemCode":"FP","Quantity":2}]}
if <b.ret_code> = -1 then
   messagebox=Error create work order : <b.ret_value> 
else
  messagebox=Work order <b.ret_value> created
end if