NetSuite Applications Suite. Table of Contents; Search ... Entering a Completion for an Individual Work Order · Entering a Completion With Backflush.
PreviousNextJavaScriptmustbeenabledtocorrectlydisplaythiscontent
IftheManufacturingWorkInProcess(WIP)featurehasbeenenabled,youcanuseSOAPwebservicestointeractwithworkordercompletionrecords.YoucanchecktoseeifWIPisenabledbygoingtoSetup>Company>EnableFeatures,andreviewingtheItems&Inventorytab.
WithWIP,insteadofcreatingasingleassemblybuildrecordtodenotethataworkorderhasbeenaddressed,youtrackprogressoftheworkusingthreerecords:workorderissue,workordercompletion,andworkorderclose.Thisapproachletsyoumanagetheassemblyprocessinamoregranularway,andtokeeptheGeneralLedgeruptodateasmaterialsmovethroughthedifferentphasesofassembly.FormoreonthebenefitsofWIP,refertoManufacturingWorkInProcess(WIP).
Theworkordercompletionrecordisusedtoindicatethatassemblieshavebeenbuilt.Youcanalsooptionallyusethisrecordtorecordthatrawmaterials—itemsinthecomponentListsublist—havebeenconsumedaspartoftheassemblyprocess.Thislatteroptioniscalledenteringacompletionwithbackflush.Forexample,youmightenteracompletionwithbackflushifpreviousrecords(suchasworkorderissue)didnotrecordtheconsumptionofallthematerialsyouendedupusing.
IntheUI,youcanviewtheformusedforcreatingtheworkordercompletionrecordbychoosingTransactions>Manufacturing>EnterCompletions,selectingaSubsidiary(forOneWorldaccounts),thenclickingtheCompletelinkthatcorrespondswithoneofthelistedworkorders.Analternatemethodistoviewtheworkorderandclickoneoftwobuttons:EnterCompletionsorEnterCompletionsWithBackflush.Forhelpfillingouttheformmanually,refertoEnteringWorkOrderCompletions.
TheworkordercompletionrecordisdefinedinthetranInvt(inventory)XSD.
SupportedOperations
Thefollowingoperationscanbeusedwithworkordercompletionrecords:
add|addList|attach/detach|delete|deleteList|get|getDeleted|getList|getSavedSearch|initialize/initializeList|search|update|updateList|upsert|upsertList
Note:
YoucanalsousetheasynchronousequivalentsofSOAPwebserviceslistoperations.Forinformationaboutasynchronousoperations,seeSOAPWebServicesAsynchronousOperations.Formoreinformationaboutrequestprocessing,seeSynchronousVersusAsynchronousRequestProcessing.
FieldDefinitions
TheSOAPSchemaBrowserincludesdefinitionsforallbodyfields,sublistfields,searchfilters,andsearchjoinsavailabletothisrecord.Fordetails,seetheSOAPSchemaBrowser’sworkordercompletionreferencepage.
Note:
ForinformationonusingtheSOAPSchemaBrowser,seeSOAPSchemaBrowser.
UsageNotes
Refertothefollowingsectionsformoredetailsoninteractingwithworkordercompletionrecords.
PrerequisitesforCreatingaRecord
Beforeyoucancreateaworkordercompletionrecord,aworkorderrecordmustalreadyexist,andtheworkordermustbeconfiguredtouseWIP(theWIPboxontheworkorderrecordmustbeselected).Thisistrueregardlessofwhetheryouarecreatingtheworkorderissuerecordusinginitializeandadd,oraddbyitself.IfyoutrytocreateaworkorderissuerecordreferencingaworkorderthathasnotbeenconfiguredtouseWIP,thesystemgeneratesanerrorreadinginpart,“Oneofthefollowingproblemsexists:Youhaveaninvalidworkorder,theworkorderdoesnotuseWIP,ortheworkorderisalreadyclosed.”
YoucancreateworkordersbychoosingTransactions>Manufacturing>EnterWorkOrders.YoucanalsointeractwithworkordersusingSOAPwebservices,asdescribedinWorkOrder.
Further,theassemblyitemreferencedintheworkordermustbeproperlysetupforWIP.Fordetailsonthisprocess,seeSettingUpItemsasWIPAssemblies.
Notethatitdoesnotmatterifaworkorderissuerecordalreadyexistsforyourworkorder.Youcangostraightfromenteringtheworkordertocreatingtheworkordercompletionrecord.
UsingInitializeVersusAdd
YoucaninitializeaworkordercompletionrecordfromaWorkOrderrecord.Thisapproachistherecommendedone,thoughyoucanalsocreatetherecordusingtheaddoperationbyitself.
UsingBothInitializeandAdd
TheinitializeoperationemulatestheUIworkflowbyprepopulatingfieldsontransactionlineitemswithvaluesfromarelatedrecord.Formoreinformationaboutthisoperation,seeinitialize/initializeList.
Notethatwhenyouusetheinitializeoperation,certainrequiredfieldsarenotinitializedandmustbesetmanually.Thesefieldsvarydependingontheworkorderthatyouareusing,asfollows:
Iftheworkorderusesrouting,thestartOperationandendOperationfieldsarebothrequired(butarenotinitialized).Thesefieldsdenotewhichoperationtaskswerecompleted.
Iftheworkorderdoesnotuserouting,thequantityfieldisrequired(butisnotinitialized).Thequantityelementdenotesthetotalnumberofassemblyitemsthatwerecompletedinthebuildprocess.Notethatyoucannotupdatethisfieldtoavaluegreaterthanthevaluecalledforintheworkorder.Attemptingtosetthevaluetoohighresultsinanerror.
Ineachcase,youmustmanuallysettherequiredvaluesinastatementbetweentheinitializeandaddstatements.Toseeanexample,refertoUsingInitializeandSettingisBackflushtoFalse.
UsingAdd
Ifyouareusingtheaddoperationbyitself,notethatyoumustusethecreatedFromfieldtoidentifytheappropriateworkorder.Ifyoufailtosetavalueforthisfield,thesystemgeneratesanerrorreading,“Transactioncanonlybecreatedfromaworkorder.”
WorkingwiththeOperationListSublist
Whenroutingisused,anadditionalsublist,operationList,isavailable.Iftheoriginalworkorderdoesnotuserouting,theoperationListsublistisunavailable.
WorkingwiththeComponentListSublist
WhenworkingwiththecomponentListsublist,notethatthesamegeneralrestrictionsapplyaswhenyouareusingtheworkorderissuerecord.Fordetails,seeWorkingwiththeComponentListSublist.
Inaddition,notethat,withworkordercompletion,youcaninteractwiththecomponentListsublistonlyiftheisBackflushelementissettotrue.
ReferalsotoUsingReplaceAllfordetailsonthevalidationthatoccurswhenreplaceAllissettotrue.
SampleCode
Thefollowingcodeillustrateshowtocreateaworkordercompletionrecordusingafewdifferenttechniques.
UsingInitializeandSettingisBackflushtoFalse
Therecommendedstrategyofcreatingaworkordercompletionrecordistousetheinitializeoperation.NotethatthisapproachgeneratestwosetsofSOAPrequestsandresponses—onefortheinitializeoperationandonefortheaddoperation.ThisexampleshowshowtouseinitializetocreateaworkordercompletionwithisBackflushsettofalse.
NotethatisBackflushissettofalsebydefault.ToincludequantityvaluesforitemsonthecomponentList,youwouldhavetosetisBackflushtotrueandspecifythequantityvaluesforthecomponentitems.(ToseeanexamplethatsetsisBackflushtotrue,seeUsingAddandSettingisBackflushtoTrue.)
Further,notethatinthisexample,theworkorderbeingreferenceddoesnotuserouting.Forthisreason,thequantityvalueisrequired—andbecausethevalueisnotinitialized,itmustbemanuallyset.Youshouldsetthequantityvaluebetweentheinitializeandaddstatements.
Java
InitializeRefinitRef=newInitializeRef();
initRef.setType(InitializeRefType.workOrder);
initRef.setInternalId("167");
WorkOrderCompletionwoRecord=(WorkOrderCompletion)c.initialize(initRef,InitializeType.workOrderCompletion,null);
woRecord.setQuantity(3.0);
c.addRecord(woRecord);
SOAPRequest(Initialize)
workOrderCompletion
SOAPResponse(Initialize)
2013-03-07T07:10:00.000-08:00
2013-03-07T08:14:00.000-08:00
2
JSAssemblyItemY
false
5.0
WorkOrder#1
2013-03-07T00:00:00.000-08:00
Mar2013
SUBUK
LocationUK
5.0
5
6.0
6
false
false
false
SOAPRequest(Add)
2013-03-07T15:10:00.000Z
2013-03-07T16:14:00.000Z
2
JSAssemblyItemY
3.0
false
5.0
WorkOrder#1
2013-03-07T08:00:00.000Z
Mar2013
SUBUK
LocationUK
5.0
5
6.0
6
false
false
false
SOAPResponse(Add)
UsingAddandSettingisBackflushtoTrue
Thefollowingexampleomitstheinitializeoperation—usingonlytheaddoperationtocreatetherecord.Inthisexample,isBackflushissettotrueandvaluesaresentforthequantitiesofitemsinthecomponentListsublist.
Notethatthisexamplesetsavalueforthequantitybodyfield.However,iftheoriginalworkorderusedarouting,thequantityfieldwouldnotbeupdatable.
Java
RecordRefcreatedFromRef=newRecordRef();
createdFromRef.setInternalId("167");
RecordRefpostingPeriodRef=newRecordRef();
postingPeriodRef.setInternalId("141");
RecordRefdepartmentRef=newRecordRef();
departmentRef.setInternalId("2");
RecordRefclassRef=newRecordRef();
classRef.setInternalId("2");
RecordRefitem1Ref=newRecordRef();
item1Ref.setInternalId("245");
RecordRefitem2Ref=newRecordRef();
item2Ref.setInternalId("246");
WorkOrderCompletionnewWOCo=newWorkOrderCompletion();
newWOCo.setExternalId("WOCo-JS-001-TEST-BFT");
newWOCo.setCreatedFrom(createdFromRef);
newWOCo.setQuantity(2.0);
newWOCo.setIsBackflush(true);
newWOCo.setPostingPeriod(postingPeriodRef);
newWOCo.setDepartment(departmentRef);
newWOCo.set_class(classRef);
newWOCo.setMemo("Add-isBackFlush=T");
WorkOrderCompletionComponent[]componentListArray={newWorkOrderCompletionComponent(),newWorkOrderCompletionComponent()};
componentListArray[0].setItem(item1Ref);
componentListArray[0].setQuantity(3.0);
componentListArray[1].setItem(item2Ref);
componentListArray[1].setQuantity(4.0);
WorkOrderCompletionComponentListcomponentList=newWorkOrderCompletionComponentList();
componentList.setWorkOrderCompletionComponent(componentListArray);
newWOCo.setComponentList(componentList);
c.addRecord(newWOCo);
SOAPRequest
2.0
true
Add-isBackFlush=T
3.0
4.0
SOAPResponse
RelatedTopics
WorkOrderIssue
MultipleShippingRoutesinSOAPWebServices
Transactions
UsageNotesforTransactionRecordTypes
TransactionSearch
MultipleShippingRoutesinSOAPWebServices
HowtoUsetheSOAPWebServicesRecordsHelp
SOAPWebServicesSupportedRecords
SOAPSchemaBrowser
SuiteTalkSOAPWebServicesPlatformOverview
AssemblyItems
ManufacturingWorkInProcess(WIP)
EnteringanIndividualWorkOrder
GeneralNotices