I get this error in AX when I attempt to send a particular quote to AX via php:
Inventory dimension Warehouse is mandatory and must consequently be specified.
This is the offending block as far as I can determine:
...
$line->InventDim = array();
$inventDim = new SalesQuotationService_AxdEntity_InventDim();
$inventDim->InventLocationId = '01';
$inventDim->InventSiteId = 'SITE 1';
$inventDim->class = 'entity';
$inventDim->configId = $configId;
$inventDim->inventSerialId='';
$line->InventDim[] = $inventDim;
...
This process fails for all quotes that use a newly-defined Inventory Dimension labeled Serl-Conf. Other quotes with other Inventory Dimensions such as STD work just fine.
In AX, in the Item Details->On Hand->Dimension Display, the following are defined for Inventory Dimension:
Field Object field name
Item Number InventSum.ItemID (not part of InventDim)
Configuration configID
Size InventSizeId
Color InventColorId
Site InventSiteId
Warehouse InventLocationId
Batch Number inventBatchId
Location wMSLocationId
Pallet ID wMSPalletId
Serial Number inventSerialId
Closed Transactions (not listed under Inventory Dimensions)
Quantity <> 0 (not listed under Inventory Dimensions)
To determine the actual field names, I right-click on the Overview tab and then select Setup. The box labeled System name gives the field name of the object as listed above.
I would like to know:
What triggers the Inventory dimension Warehouse error?
I have been told it is the
InventLocationId
field as shown above, but I'm doubting now because of this pernicious error (it's obvious the value is set in the code above... and there is only one warehouse location in AX and it's set to '01'... and this code works for all other quotes).Can any other problem trigger this same error message? Am I looking in the right place?
Edit: xml sent to AIF: Note: The InventDimId on lines 160 and 232 are xsi:nil= true. Could this be the problem?
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.microsoft.com/dynamics/2008/01/documents/SalesQuotationService" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://tempuri.org">
<SOAP-ENV:Body>
<ns2:SalesQuotationServiceCreateRequest>
<ns1:SalesQuotationService>
<ns1:DocPurpose>Original</ns1:DocPurpose>
<ns1:SenderId>hws</ns1:SenderId>
<ns1:SalesQuotationTable class="entity">
<ns1:_DocumentHash xsi:nil="true"/>
<ns1:BusRelAccount xsi:nil="true"/>
<ns1:CallListID xsi:nil="true"/>
<ns1:CampaignId xsi:nil="true"/>
<ns1:CaseTagging xsi:nil="true"/>
<ns1:CashDisc xsi:nil="true"/>
<ns1:Cntct_Address xsi:nil="true"/>
<ns1:Cntct_City xsi:nil="true"/>
<ns1:Cntct_Company xsi:nil="true"/>
<ns1:Cntct_Email xsi:nil="true"/>
<ns1:Cntct_FName xsi:nil="true"/>
<ns1:Cntct_LName xsi:nil="true"/>
<ns1:Cntct_Phone xsi:nil="true"/>
<ns1:Cntct_ST xsi:nil="true"/>
<ns1:Cntct_Title xsi:nil="true"/>
<ns1:Cntct_Zipcode xsi:nil="true"/>
<ns1:CommissionGroup xsi:nil="true"/>
<ns1:ConfirmDate xsi:nil="true"/>
<ns1:ContactPersonId xsi:nil="true"/>
<ns1:CovStatus xsi:nil="true"/>
<ns1:CurrencyCode>USD</ns1:CurrencyCode>
<ns1:CustAccount>11759</ns1:CustAccount>
<ns1:CustomerRef xsi:nil="true"/>
<ns1:CustPurchaseOrder xsi:nil="true"/>
<ns1:DeliveryAddress xsi:nil="true"/>
<ns1:DeliveryCity xsi:nil="true"/>
<ns1:DeliveryCountryRegionId xsi:nil="true"/>
<ns1:DeliveryCounty xsi:nil="true"/>
<ns1:DeliveryDateControlType xsi:nil="true"/>
<ns1:DeliveryName xsi:nil="true"/>
<ns1:DeliveryState xsi:nil="true"/>
<ns1:DeliveryStreet xsi:nil="true"/>
<ns1:DeliveryZipCode xsi:nil="true"/>
<ns1:Dimension xsi:nil="true"/>
<ns1:DiscPercent>0</ns1:DiscPercent>
<ns1:DlvMode xsi:nil="true"/>
<ns1:DlvReason xsi:nil="true"/>
<ns1:DlvTerm xsi:nil="true"/>
<ns1:DocuConclusion xsi:nil="true"/>
<ns1:DocuIntro xsi:nil="true"/>
<ns1:DocuTitle xsi:nil="true"/>
<ns1:Email xsi:nil="true"/>
<ns1:EndDisc xsi:nil="true"/>
<ns1:EndUser xsi:nil="true"/>
<ns1:EPC xsi:nil="true"/>
<ns1:ESD_SalesEngineer xsi:nil="true"/>
<ns1:ESDOrder xsi:nil="true"/>
<ns1:Estimate xsi:nil="true"/>
<ns1:ExportReason xsi:nil="true"/>
<ns1:FixedDueDate xsi:nil="true"/>
<ns1:FixedExchRate xsi:nil="true"/>
<ns1:FreightSlipType xsi:nil="true"/>
<ns1:FreightZone xsi:nil="true"/>
<ns1:InclTax xsi:nil="true"/>
<ns1:InventLocationId>01</ns1:InventLocationId>
<ns1:InventSiteId>SITE 1</ns1:InventSiteId>
<ns1:InvoiceAccount>11759</ns1:InvoiceAccount>
<ns1:ItemTagging xsi:nil="true"/>
<ns1:LanguageId>EN-US</ns1:LanguageId>
<ns1:LineDisc xsi:nil="true"/>
<ns1:LineOfBusiness xsi:nil="true"/>
<ns1:Listcode xsi:nil="true"/>
<ns1:MarkupGroup xsi:nil="true"/>
<ns1:ModelId xsi:nil="true"/>
<ns1:MultiLineDisc xsi:nil="true"/>
<ns1:Notes>1. No specifications provided.
2. Haws offers the product listed in this quotation.
3. Haws Corporation sells through distribution. Any commercial terms apply to contract between the purchaser and distributor and are not applicable to Haws. Contact Haws for distribution information.
4. Haws standard terms and conditions apply unless otherwise agreed upon prior to purchase.
5. Extended warranty pricing is available upon request.
6. Please see "Terms and Conditions" item #4 for list of standard documentation. Should any deviation from the Item 4 in the terms and conditions be required, please specify the necessary requirements. Deviations or additions will be subject to an additional charge to be determined at the time of quotation if and when such requests can be accommodated.
7. Haws Corporation reserves the right to adjust or amend pricing should new information or specifications be provided after the initial request for quote.
8. Current estimated lead time is 12 to 14 weeks after receipt of a final signed approval of all drawings and components. All drawings must be Code "A" or Code "1" and must have an authorized signature and date to be released to manufacturing or production. Lead times are based on our current work load and are subject to change. Please verify lead times at the time of order.
9. Freight and crating are not included in the pricing of this quotation.
10. Commissioning, start up, and technical field services are not included in the price. Contact Haws for pricing of on-sites services.</ns1:Notes>
<ns1:NumberSequenceGroup xsi:nil="true"/>
<ns1:OpportunityId xsi:nil="true"/>
<ns1:OrigQuotationId xsi:nil="true"/>
<ns1:PalletTagging xsi:nil="true"/>
<ns1:Payment xsi:nil="true"/>
<ns1:PaymMode xsi:nil="true"/>
<ns1:PaymSpec xsi:nil="true"/>
<ns1:Port xsi:nil="true"/>
<ns1:PostingProfile xsi:nil="true"/>
<ns1:PriceGroupId xsi:nil="true"/>
<ns1:Probability xsi:nil="true"/>
<ns1:ProjectName>UniSea Inc.-9400's-Dutch Harbor-AK</ns1:ProjectName>
<ns1:ProjIdRef xsi:nil="true"/>
<ns1:ProjInvoiceProjId xsi:nil="true"/>
<ns1:QuotationCategory xsi:nil="true"/>
<ns1:QuotationExpiryDate>2015-04-07</ns1:QuotationExpiryDate>
<ns1:QuotationFollowupActivity xsi:nil="true"/>
<ns1:QuotationFollowUpDate xsi:nil="true"/>
<ns1:QuotationId xsi:nil="true"/>
<ns1:QuotationName>UniSea Inc.-9400's-Dutch Harbor-AK</ns1:QuotationName>
<ns1:QuotationStatus>Sent</ns1:QuotationStatus>
<ns1:QuotationType>Sales</ns1:QuotationType>
<ns1:ReasonId xsi:nil="true"/>
<ns1:ReceiptDateRequested>2015-04-07</ns1:ReceiptDateRequested>
<ns1:RecId xsi:nil="true"/>
<ns1:RecVersion xsi:nil="true"/>
<ns1:Registered xsi:nil="true"/>
<ns1:RegisteredRep xsi:nil="true"/>
<ns1:SalesGroup xsi:nil="true"/>
<ns1:SalesIdRef xsi:nil="true"/>
<ns1:SalesOriginId xsi:nil="true"/>
<ns1:SalesPoolId xsi:nil="true"/>
<ns1:SalesRep xsi:nil="true"/>
<ns1:SalesResponsible>6883</ns1:SalesResponsible>
<ns1:SalesTaker>6883</ns1:SalesTaker>
<ns1:SalesUnitId xsi:nil="true"/>
<ns1:SettleVoucher xsi:nil="true"/>
<ns1:SFQouteNumber>00003041</ns1:SFQouteNumber>
<ns1:ShippingDateRequested xsi:nil="true"/>
<ns1:StatProcId xsi:nil="true"/>
<ns1:TaxGroup xsi:nil="true"/>
<ns1:TemplateActive xsi:nil="true"/>
<ns1:TemplateGroupId xsi:nil="true"/>
<ns1:TemplateName xsi:nil="true"/>
<ns1:TransactionCode xsi:nil="true"/>
<ns1:TransferredToForecast xsi:nil="true"/>
<ns1:TransferredToItemReq xsi:nil="true"/>
<ns1:Transport xsi:nil="true"/>
<ns1:URL xsi:nil="true"/>
<ns1:VATNum xsi:nil="true"/>
<ns1:SalesQuotationLine class="entity">
<ns1:AccountType xsi:nil="true"/>
<ns1:BarCode xsi:nil="true"/>
<ns1:BarCodeType xsi:nil="true"/>
<ns1:CaseTagging xsi:nil="true"/>
<ns1:CommissionRate xsi:nil="true"/>
<ns1:Company>hws</ns1:Company>
<ns1:ConfirmedDlv xsi:nil="true"/>
<ns1:CostPrice xsi:nil="true"/>
<ns1:CurrencyCode>USD</ns1:CurrencyCode>
<ns1:CustAccount>11759</ns1:CustAccount>
<ns1:CustomerRef xsi:nil="true"/>
<ns1:DeliveryAddress xsi:nil="true"/>
<ns1:DeliveryCity xsi:nil="true"/>
<ns1:DeliveryCountryRegionId xsi:nil="true"/>
<ns1:DeliveryCounty xsi:nil="true"/>
<ns1:DeliveryDateControlType xsi:nil="true"/>
<ns1:DeliveryName xsi:nil="true"/>
<ns1:DeliveryState xsi:nil="true"/>
<ns1:DeliveryStreet xsi:nil="true"/>
<ns1:DeliveryZipCode xsi:nil="true"/>
<ns1:Dimension xsi:nil="true"/>
<ns1:DlvMode xsi:nil="true"/>
<ns1:EndDate xsi:nil="true"/>
<ns1:ExternalItemId xsi:nil="true"/>
<ns1:InventDeliverNow xsi:nil="true"/>
<ns1:InventDimId xsi:nil="true"/>
<ns1:InventRefId xsi:nil="true"/>
<ns1:InventRefTransId xsi:nil="true"/>
<ns1:InventRefType xsi:nil="true"/>
<ns1:InventTransId xsi:nil="true"/>
<ns1:ItemBOMId xsi:nil="true"/>
<ns1:ItemId>9400</ns1:ItemId>
<ns1:ItemRouteId xsi:nil="true"/>
<ns1:ItemTagging xsi:nil="true"/>
<ns1:LedgerAccount xsi:nil="true"/>
<ns1:LineAmount xsi:nil="true"/>
<ns1:LineDisc xsi:nil="true"/>
<ns1:LineHeader xsi:nil="true"/>
<ns1:LineNum>1.0000000000</ns1:LineNum>
<ns1:LinePercent>0</ns1:LinePercent>
<ns1:LinePropertyId xsi:nil="true"/>
<ns1:MultiLnDisc xsi:nil="true"/>
<ns1:MultiLnPercent xsi:nil="true"/>
<ns1:Name>Steam Heat Exchanger</ns1:Name>
<ns1:NewSalesPrice xsi:nil="true"/>
<ns1:NewTotalContributionRatio xsi:nil="true"/>
<ns1:OffsetAccount xsi:nil="true"/>
<ns1:OffsetAccountType xsi:nil="true"/>
<ns1:OffsetCompany xsi:nil="true"/>
<ns1:OffsetTxt xsi:nil="true"/>
<ns1:OrigCostPrice xsi:nil="true"/>
<ns1:OverDeliveryPct xsi:nil="true"/>
<ns1:OverrideCommission xsi:nil="true"/>
<ns1:PackingUnit xsi:nil="true"/>
<ns1:PackingUnitQty xsi:nil="true"/>
<ns1:PalletTagging xsi:nil="true"/>
<ns1:Port xsi:nil="true"/>
<ns1:PriceCalcId xsi:nil="true"/>
<ns1:PriceUnit>1.00</ns1:PriceUnit>
<ns1:ProjCategoryId xsi:nil="true"/>
<ns1:ProjDescription xsi:nil="true"/>
<ns1:ProjTransCode xsi:nil="true"/>
<ns1:ProjTransType xsi:nil="true"/>
<ns1:QtyOrdered>12.00</ns1:QtyOrdered>
<ns1:QuotationId xsi:nil="true"/>
<ns1:QuotationStatus xsi:nil="true"/>
<ns1:ReceiptDateRequested xsi:nil="true"/>
<ns1:RecId xsi:nil="true"/>
<ns1:RecVersion xsi:nil="true"/>
<ns1:RemainInventPhysical xsi:nil="true"/>
<ns1:RemainSalesFinancial xsi:nil="true"/>
<ns1:RemainSalesPhysical xsi:nil="true"/>
<ns1:SalesDeliverNow xsi:nil="true"/>
<ns1:SalesGroup xsi:nil="true"/>
<ns1:SalesMarkup xsi:nil="true"/>
<ns1:SalesPrice>9500.00</ns1:SalesPrice>
<ns1:SalesPriceNet xsi:nil="true"/>
<ns1:SalesQty>12.00</ns1:SalesQty>
<ns1:SalesUnit>Ea</ns1:SalesUnit>
<ns1:ShippingDateRequested>2015-04-07</ns1:ShippingDateRequested>
<ns1:StartDate xsi:nil="true"/>
<ns1:StatProcId xsi:nil="true"/>
<ns1:StatTriangularDeal xsi:nil="true"/>
<ns1:TaxAutoGenerated xsi:nil="true"/>
<ns1:TaxGroup xsi:nil="true"/>
<ns1:TaxItemGroup xsi:nil="true"/>
<ns1:TransactionCode xsi:nil="true"/>
<ns1:TransDate xsi:nil="true"/>
<ns1:Transferred2Forecast xsi:nil="true"/>
<ns1:Transferred2ItemReq xsi:nil="true"/>
<ns1:Transferred2Journal xsi:nil="true"/>
<ns1:Transport xsi:nil="true"/>
<ns1:UnderDeliveryPct xsi:nil="true"/>
<ns1:InventDim class="entity">
<ns1:configId>STD</ns1:configId>
<ns1:InventBatchId xsi:nil="true"/>
<ns1:InventColorId xsi:nil="true"/>
<ns1:inventDimId xsi:nil="true"/>
<ns1:InventLocationId>01</ns1:InventLocationId>
<ns1:inventSerialId/>
<ns1:InventSiteId>SITE 1</ns1:InventSiteId>
<ns1:InventSizeId xsi:nil="true"/>
<ns1:RecId xsi:nil="true"/>
<ns1:RecVersion xsi:nil="true"/>
<ns1:wMSLocationId xsi:nil="true"/>
</ns1:InventDim>
</ns1:SalesQuotationLine>
</ns1:SalesQuotationTable>
</ns1:SalesQuotationService>
</ns2:SalesQuotationServiceCreateRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Heap Size: 43 MB
20150323 09:41:49
<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring xml:lang="en-US">Request Failed. See the Exception Log for details.</faultstring>
<detail>
<AifFault xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/Fault" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<CustomDetailXml i:nil="true"/>
<FaultMessageListArray i:nil="true"/>
</AifFault>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>