HomeGuidesAPI ReferenceChangelogDeveloper Q&A
HomeGuidesAPI ReferenceAnnouncementsLog In
Developer Q&A

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_2713, this_.ConcurrencyId as concurrencyid2_2713, this_.Number as number3_2713, this_.TypeID as typeid4_2713, this_.PriorityID as priorityid5_2713, this_.StatusID as statusid6_2713, this_.Creator_AID as creator7_2713, this_.PTE_TypeID as pte8_2713, this_.Asset_ID as asset9_2713, this_.Asset_Location as asset10_2713, this_.Task_Refinement as task11_2713, this_.Owner_CommunityId as owner12_2713, this_.Owner_TeamID as owner13_2713, this_.Owner_EmployeeID as owner14_2713, this_.Schedule_Duration as schedule15_2713, this_.MoneyId as moneyid16_2713, this_.Billback_Amount as billback17_2713, this_.Task_SpecialityID as task18_2713, this_.Billback_PORef as billback19_2713, this_.SubTypeID as subtypeid20_2713, this_.RepairCodeID as repaircodeid21_2713, this_.Tenant_ID as tenant22_2713, this_.InvLoc_ID as invloc23_2713, this_.Creator_Refinement as creator24_2713, this_.WONID as wonid25_2713, this_.WONIsPossibleCoverWarranty as wonispossiblecoverwarranty26_2713, this_.AttnFlagID as attnflagid27_2713, this_.TimeZone as timezone28_2713, this_.utcCreated as utccreated29_2713, this_.TimeCreated as timecreated30_2713, this_.utcDue as utcdue31_2713, this_.DueDate as duedate32_2713, this_.utcStart as utcstart33_2713, this_.Schedule_StartDateTime as schedule34_2713, this_.utcLastAction as utclastaction35_2713, this_.dtLastAction as dtlastaction36_2713, this_.utcOnSiteBy as utconsiteby37_2713, this_.dtOnSiteBy as dtonsiteby38_2713, this_.CrewSize as crewsize39_2713, this_.dtAckBy as dtackby40_2713, this_.utcAckBy as utcackby41_2713, this_.OwnerEmpId as ownerempid42_2713, this_.Odf as odf43_2713, workorderc2_.WoId as woid1_2730, workorderc2_.ConcurrencyId as concurrencyid2_2730, workorderc2_.MoneyID as moneyid3_2730, workorderc2_.BillToTypeId as billtotypeid4_2730, workorderc2_.Cost as cost5_2730, workorderc2_.ApStatusId as apstatusid6_2730, workorderc2_.ApStateId as apstateid7_2730, workorderc2_.JobCode as jobcode8_2730, workorderc2_.WoCostDefId as wocostdefid9_2730, workorderc2_.ApAuthorization as apauthorization10_2730, workorderc2_.ApCheck as apcheck11_2730, workorderc2_.ApAmtPaid as apamtpaid12_2730, workorderc2_.ApNotes as apnotes13_2730, workorderc2_.DtApCheckCut as dtapcheckcut14_2730, workorderc2_.DtApCheckClear as dtapcheckclear15_2730, workorderc2_.ApGlAccount as apglaccount16_2730, workorderc2_.ApNumber as apnumber17_2730, workorderc2_.DtVendInvoice as dtvendinvoice18_2730, workorderc2_.DtVendInvoiceRec as dtvendinvoicerec19_2730, workorderc2_.ApAmtTotal as apamttotal20_2730, workorderc2_.IsPreBill as isprebill21_2730, workorderc2_.ApAmtOriginal as apamtoriginal22_2730, workorderc2_.AmtExpense as amtexpense23_2730, workorderc2_.BillRule as billrule24_2730, workorderc2_.CustomerNte as customernte25_2730, workorderc2_.TaxStatusId as taxstatusid26_2730, workorderc2_.amtFees as amtfees27_2730, workorderc2_.ExternalID as externalid28_2730, workorderc2_.CostStateID as coststateid29_2730, workorderc2_.ChargeCodeID as chargecodeid30_2730, workorderc2_.BillAcctID as billacctid31_2730, workorderc2_.CostStatusID as coststatusid32_2730, workorderc2_.amtWhTax as amtwhtax33_2730, workorderc2_.Odf as odf34_2730, community3_.Id as id1_821, community3_.ConcurrencyId as concurrencyid2_821, community3_.IsRemoved as isremoved3_821, community3_.Uidx as uidx4_821, community3_.DisplayAs as displayas5_821, community3_.UseBizHours as usebizhours6_821, community3_.UseHolidays as useholidays7_821, community3_.UseOnCall as useoncall8_821, community3_.UseEscalation as useescalation9_821, community3_.AssetID as assetid10_821, community3_.TimeZone as timezone11_821, community3_.LanguageID as languageid12_821, community3_.ShortName as shortname13_821, community3_.Organization as organization14_821, community3_.SchedWindow as schedwindow15_821, community3_.NoIncompletePL as noincompletepl16_821, community3_.PteMask as ptemask17_821, community3_.Number as number18_821, community3_.ApptAdvanceHr as apptadvancehr19_821, community3_.DefTaxID as deftaxid20_821, community3_.WoNumberLen as wonumberlen21_821, community3_.ApptTimeRound as appttimeround22_821, community3_.WPAutoCancel as wpautocancel23_821, community3_.WPCheckChildStatus as wpcheckchildstatus24_821, community3_.WPAutoDependency as wpautodependency25_821, community3_.CpThemeID as cpthemeid26_821, community3_.DefPteTypeID as defptetypeid27_821, community3_.IsRouteSpecialty as isroutespecialty28_821, community3_.RouteTypeID as routetypeid29_821, community3_.DefBillAcctID as defbillacctid30_821, community3_.DefContractID as defcontractid31_821, community3_.NoIncompleteItem as noincompleteitem32_821, community3_.DefAssignWon as defassignwon33_821, community3_.MoneyID as moneyid34_821, community3_.IsOffline as isoffline35_821, lease1_.Id as id1_1582, lease1_.ConcurrencyId as concurrencyid2_1582, lease1_.IsVoid as isvoid3_1582, lease1_.DisplayAs as displayas4_1582, lease1_.CommunityID as communityid5_1582, lease1_.DBA as dba6_1582, lease1_.Instructions as instructions7_1582, lease1_.TenantCode as tenantcode8_1582, lease1_.TaxExempt as taxexempt9_1582, lease1_.Name as name10_1582, lease1_.WOCostDefID as wocostdefid11_1582 FROM dbo.WorkOrder2Object this_ left outer join dbo.WorkOrderCostObject workorderc2 on this.Id=workorderc2_.WoId left outer join CommunityObject community3 on this.Owner_CommunityId=community3_.Id left outer join dbo.lsLeaseObject lease1 on this.Tenant_ID=lease1_.Id WHERE this_.Id = ?;
SELECT this_.Id as id1_2580, this_.ConcurrencyId as concurrencyid2_2580, this_.Odf as odf3_2580, this_.IsPrimary as isprimary4_2580, this_.Actor_ID as actor5_2580, this_.WorkOrderID as workorderid6_2580 FROM dbo.lnWOEmpl2Object this_ WHERE this_.WorkOrderID = ?;
]

Can you please advise?
Thanks,
-Ed