Developer Q&A

Ask a Question
Back to All

Error Requesting WorkOrderCost

We are getting new SOAP errors when attempting to access a WorkOrderCost associated with a Work Order. This API call has been working for months but is now throwing an error on every WorkOrderCost value.

Basically, we are querying a WorkOrder with related WorkOrderCost information. Here's a snipped of code (in Java):

// Set up an EntitySpecifier
EntitySpecifier entitySpecifier = new EntitySpecifier();
entitySpecifier.setId(91580);
entitySpecifier.setEntityType(EntityType.WORK_ORDER);

// Create a ProperSet with the values to be retrieved
PropertySet propertySet = new PropertySet();
ArrayOfString strings = new ArrayOfString();

strings.getString().add("Number");
strings.getString().add("WorkOrderCost.Number");
propertySet.setProperties(strings);
WorkOrder order = (WorkOrder) port.retrieve(entitySpecifier, propertySet);

It's the request to add a "WorkOrderCost" value that causes a SOAP error. Any WorkOrderCost attribute included in the property set causes this error:

Client received SOAP Fault from server: System.Web.Services.Protocols.SoapException: Failed to execute multi criteria[SQL: SELECT this.Id as id1_271_3, this.ConcurrencyId as concurrencyid2_271_3, this.Number as number3_271_3, this.TypeID as typeid4_271_3, this.PriorityID as priorityid5_271_3, this.StatusID as statusid6_271_3, this.Creator_AID as creator7_271_3, this.PTE_TypeID as pte8_271_3, this.Asset_ID as asset9_271_3, this.Asset_Location as asset10_271_3, this.Task_Refinement as task11_271_3, this.Owner_CommunityId as owner12_271_3, this.Owner_TeamID as owner13_271_3, this.Owner_EmployeeID as owner14_271_3, this.Schedule_Duration as schedule15_271_3, this.MoneyId as moneyid16_271_3, this.Billback_Amount as billback17_271_3, this.Task_SpecialityID as task18_271_3, this.Billback_PORef as billback19_271_3, this.SubTypeID as subtypeid20_271_3, this.RepairCodeID as repaircodeid21_271_3, this.Tenant_ID as tenant22_271_3, this.InvLoc_ID as invloc23_271_3, this.Creator_Refinement as creator24_271_3, this.WONID as wonid25_271_3, this.WONIsPossibleCoverWarranty as wonispossiblecoverwarranty26_271_3, this.AttnFlagID as attnflagid27_271_3, this.TimeZone as timezone28_271_3, this.utcCreated as utccreated29_271_3, this.TimeCreated as timecreated30_271_3, this.utcDue as utcdue31_271_3, this.DueDate as duedate32_271_3, this.utcStart as utcstart33_271_3, this.Schedule_StartDateTime as schedule34_271_3, this.utcLastAction as utclastaction35_271_3, this.dtLastAction as dtlastaction36_271_3, this.utcOnSiteBy as utconsiteby37_271_3, this.dtOnSiteBy as dtonsiteby38_271_3, this.CrewSize as crewsize39_271_3, this.dtAckBy as dtackby40_271_3, this.utcAckBy as utcackby41_271_3, this.OwnerEmpId as ownerempid42_271_3, this.Odf as odf43_271_3, workorderc2.WoId as woid1_273_0, workorderc2.ConcurrencyId as concurrencyid2_273_0, workorderc2.MoneyID as moneyid3_273_0, workorderc2.BillToTypeId as billtotypeid4_273_0, workorderc2.Cost as cost5_273_0, workorderc2.ApStatusId as apstatusid6_273_0, workorderc2.ApStateId as apstateid7_273_0, workorderc2.JobCode as jobcode8_273_0, workorderc2.WoCostDefId as wocostdefid9_273_0, workorderc2.ApAuthorization as apauthorization10_273_0, workorderc2.ApCheck as apcheck11_273_0, workorderc2.ApAmtPaid as apamtpaid12_273_0, workorderc2.ApNotes as apnotes13_273_0, workorderc2.DtApCheckCut as dtapcheckcut14_273_0, workorderc2.DtApCheckClear as dtapcheckclear15_273_0, workorderc2.ApGlAccount as apglaccount16_273_0, workorderc2.ApNumber as apnumber17_273_0, workorderc2.DtVendInvoice as dtvendinvoice18_273_0, workorderc2.DtVendInvoiceRec as dtvendinvoicerec19_273_0, workorderc2.ApAmtTotal as apamttotal20_273_0, workorderc2.IsPreBill as isprebill21_273_0, workorderc2.ApAmtOriginal as apamtoriginal22_273_0, workorderc2.AmtExpense as amtexpense23_273_0, workorderc2.BillRule as billrule24_273_0, workorderc2.CustomerNte as customernte25_273_0, workorderc2.TaxStatusId as taxstatusid26_273_0, workorderc2.amtFees as amtfees27_273_0, workorderc2.ExternalID as externalid28_273_0, workorderc2.CostStateID as coststateid29_273_0, workorderc2.ChargeCodeID as chargecodeid30_273_0, workorderc2.BillAcctID as billacctid31_273_0, workorderc2.CostStatusID as coststatusid32_273_0, workorderc2.amtWhTax as amtwhtax33_273_0, workorderc2.Odf as odf34_273_0, community3.Id as id1_82_1, community3.ConcurrencyId as concurrencyid2_82_1, community3.IsRemoved as isremoved3_82_1, community3.Uidx as uidx4_82_1, community3.DisplayAs as displayas5_82_1, community3.UseBizHours as usebizhours6_82_1, community3.UseHolidays as useholidays7_82_1, community3.UseOnCall as useoncall8_82_1, community3.UseEscalation as useescalation9_82_1, community3.AssetID as assetid10_82_1, community3.TimeZone as timezone11_82_1, community3.LanguageID as languageid12_82_1, community3.ShortName as shortname13_82_1, community3.Organization as organization14_82_1, community3.SchedWindow as schedwindow15_82_1, community3.NoIncompletePL as noincompletepl16_82_1, community3.PteMask as ptemask17_82_1, community3.Number as number18_82_1, community3.ApptAdvanceHr as apptadvancehr19_82_1, community3.DefTaxID as deftaxid20_82_1, community3.WoNumberLen as wonumberlen21_82_1, community3.ApptTimeRound as appttimeround22_82_1, community3.WPAutoCancel as wpautocancel23_82_1, community3.WPCheckChildStatus as wpcheckchildstatus24_82_1, community3.WPAutoDependency as wpautodependency25_82_1, community3.CpThemeID as cpthemeid26_82_1, community3.DefPteTypeID as defptetypeid27_82_1, community3.IsRouteSpecialty as isroutespecialty28_82_1, community3.RouteTypeID as routetypeid29_82_1, community3.DefBillAcctID as defbillacctid30_82_1, community3.DefContractID as defcontractid31_82_1, community3.NoIncompleteItem as noincompleteitem32_82_1, community3.DefAssignWon as defassignwon33_82_1, community3.MoneyID as moneyid34_82_1, community3.IsOffline as isoffline35_82_1, lease1.Id as id1_158_2, lease1.ConcurrencyId as concurrencyid2_158_2, lease1.IsVoid as isvoid3_158_2, lease1.DisplayAs as displayas4_158_2, lease1.CommunityID as communityid5_158_2, lease1.DBA as dba6_158_2, lease1.Instructions as instructions7_158_2, lease1.TenantCode as tenantcode8_158_2, lease1.TaxExempt as taxexempt9_158_2, lease1.Name as name10_158_2, lease1.WOCostDefID as wocostdefid11_158_2 FROM dbo.WorkOrder2Object this left outer join dbo.WorkOrderCostObject workorderc2 on this.Id=workorderc2.WoId left outer join CommunityObject community3 on this.OwnerCommunityId=community3.Id left outer join dbo.lsLeaseObject lease1 on this.TenantID=lease1.Id WHERE this.Id = ?;
SELECT this
.Id as id1258_0, this.ConcurrencyId as concurrencyid2_258_0, this.Odf as odf3_258_0, this.IsPrimary as isprimary4_258_0, this.Actor_ID as actor5_258_0, this.WorkOrderID as workorderid6_258_0 FROM dbo.lnWOEmpl2Object this WHERE this.WorkOrderID = ?;
]

Can you please advise?
Thanks,
-Ed