使用Acumatica 17.210.0034和API端点17.200.001,我正在做一个包含自定义字段的PUT,但是未在db中设置自定义字段的值。任何帮助,将不胜感激。插入和更新也会发生相同的情况。已添加数据,但未设置自定义字段值。
输入网址:
http://localhost/acuroyalbay172100034/entity/Default/17.200.001/StockItem?%24custom=InventoryItemExt.UsrSquareFTG%2cInventoryItemExt.UsrDispPerPallet%2cInventoryItemExtension.UsrItemClassCD%2cInventoryItemAMExtension.AMReplenishmentSource%2cInventoryItemAMExtension.AMLotSize%2cInventoryItemAMExtension.AMMaxOrdQty%2cInventoryItemAMExtension.AMMinOrdQty%2cInventoryItemAMExtension.AMLowLevel%2cInventoryItemAMExtension.AMMRPItem%2cInventoryItemAMExtension.AMMFGLeadTime%2cInventoryItemAMExtension.AMGroupWindow%2cInventoryItemAMExtension.AMConfigurationID%2cInventoryItemAMExtension.AMReplenishmentSourceOverride%2cInventoryItemAMExtension.AMSafetyStockOverride%2cInventoryItemAMExtension.AMSafetyStock%2cInventoryItemAMExtension.AMMinQtyOverride%2cInventoryItemAMExtension.AMMinQty%2cInventoryItemAMExtension.AMQtyRoundUp
请求正文:
{
"AverageCost": {
"value": 0.0
},
"BaseUOM": {
"value": "EA"
},
"COGSAccount": {
"value": "50000"
},
"COGSSubaccount": {
"value": "CON000"
},
"CurrentStdCost": {
"value": 0.0
},
"DefaultIssueLocationID": {
"value": "R1S1"
},
"DefaultPrice": {
"value": 0.0
},
"DefaultReceiptLocationID": {
"value": "RECEIVING"
},
"DefaultWarehouseID": {
"value": "WHOLESALE"
},
"Description": {
"value": "tonyitem153"
},
"DimensionVolume": {
"value": 0.0
},
"DimensionWeight": {
"value": 0.0
},
"InventoryAccount": {
"value": "12100"
},
"InventoryID": {
"value": "RGTONYIT153"
},
"InventorySubaccount": {
"value": "CON000"
},
"IsAKit": {
"value": false
},
"ItemClass": {
"value": "CONSUMER 200FITNESS"
},
"ItemStatus": {
"value": "Active"
},
"ItemType": {
"value": "Finished Good"
},
"LandedCostVarianceAccount": {
"value": "52400"
},
"LandedCostVarianceSubaccount": {
"value": "CON000"
},
"LastCost": {
"value": 0.0
},
"LastModified": {
"value": "2018-09-11T12:36:15.483-04:00"
},
"LastStdCost": {
"value": 0.0
},
"LotSerialClass": {
"value": "NOTTRACKED"
},
"Markup": {
"value": 0.0
},
"MaxCost": {
"value": 0.0
},
"MinCost": {
"value": 0.0
},
"MinMarkup": {
"value": 0.0
},
"MSRP": {
"value": 0.0
},
"PackagingOption": {
"value": "Manual"
},
"PackSeparately": {
"value": false
},
"PendingStdCost": {
"value": 0.0
},
"POAccrualAccount": {
"value": "20100"
},
"POAccrualSubaccount": {
"value": "CON000"
},
"PostingClass": {
"value": "CON"
},
"PurchasePriceVarianceAccount": {
"value": "52300"
},
"PurchasePriceVarianceSubaccount": {
"value": "CON000"
},
"PurchaseUOM": {
"value": "EA"
},
"ReasonCodeSubaccount": {
"value": "CON000"
},
"SalesAccount": {
"value": "40000"
},
"SalesSubaccount": {
"value": "CON000"
},
"SalesUOM": {
"value": "EA"
},
"StandardCostRevaluationAccount": {
"value": "52110"
},
"StandardCostRevaluationSubaccount": {
"value": "CON000"
},
"StandardCostVarianceAccount": {
"value": "52100"
},
"StandardCostVarianceSubaccount": {
"value": "CON000"
},
"SubjectToCommission": {
"value": false
},
"TaxCategory": {
"value": "TAXABLE"
},
"ValuationMethod": {
"value": "Average"
},
"custom": {
"InventoryItemExt": {
"UsrSquareFTG": {
"type": "CustomDecimalField",
"value": 5.0
},
"UsrDispPerPallet": {
"type": "CustomIntField",
"value": 6
}
},
"InventoryItemExtension": {
"UsrItemClassCD": {
"type": "CustomStringField",
"value": "CONSUMER 200FITNESS"
}
},
"InventoryItemAMExtension": {
"AMReplenishmentSource": {
"type": "CustomStringField",
"value": "Purchase"
},
"AMLotSize": {
"type": "CustomDecimalField",
"value": 0.0
},
"AMMaxOrdQty": {
"type": "CustomDecimalField",
"value": 0.0
},
"AMMinOrdQty": {
"type": "CustomDecimalField",
"value": 0.0
},
"AMLowLevel": {
"type": "CustomIntField",
"value": 0
},
"AMMRPItem": {
"type": "CustomBooleanField",
"value": true
},
"AMMFGLeadTime": {
"type": "CustomIntField",
"value": 0
},
"AMGroupWindow": {
"type": "CustomIntField",
"value": 0
},
"AMConfigurationID": {
"type": "CustomStringField"
},
"AMReplenishmentSourceOverride": {
"type": "CustomBooleanField",
"value": false
},
"AMSafetyStockOverride": {
"type": "CustomBooleanField",
"value": false
},
"AMSafetyStock": {
"type": "CustomDecimalField",
"value": 0.0
},
"AMMinQtyOverride": {
"type": "CustomBooleanField",
"value": false
},
"AMMinQty": {
"type": "CustomDecimalField",
"value": 0.0
},
"AMQtyRoundUp": {
"type": "CustomBooleanField",
"value": false
}
}
}
}
响应:
{
"id": "2299727f-c471-46de-a8ac-9dcfe1a2a09f",
"rowNumber": 1,
"note": null,
"ABCCode": {},
"AutoIncrementalValue": {},
"AverageCost": {
"value": 0
},
"BaseUOM": {
"value": "EA"
},
"COGSAccount": {
"value": "50000"
},
"COGSSubaccount": {
"value": "CON000"
},
"Content": {},
"CurrentStdCost": {
"value": 0
},
"DefaultIssueLocationID": {
"value": "R1S1"
},
"DefaultPrice": {
"value": 0
},
"DefaultReceiptLocationID": {
"value": "RECEIVING"
},
"DefaultWarehouseID": {
"value": "WHOLESALE"
},
"DeferralAccount": {},
"DeferralSubaccount": {},
"Description": {
"value": "tonyitem153"
},
"DimensionVolume": {
"value": 0
},
"DimensionWeight": {
"value": 0
},
"DiscountAccount": {},
"DiscountSubaccount": {},
"ImageUrl": {},
"InventoryAccount": {
"value": "12100"
},
"InventoryID": {
"value": "RGTONYIT153"
},
"InventorySubaccount": {
"value": "CON000"
},
"IsAKit": {
"value": false
},
"ItemClass": {
"value": "CONSUMER 200FITNESS"
},
"ItemStatus": {
"value": "Active"
},
"ItemType": {
"value": "Finished Good"
},
"LandedCostVarianceAccount": {
"value": "52400"
},
"LandedCostVarianceSubaccount": {
"value": "CON000"
},
"LastCost": {
"value": 0
},
"LastModified": {
"value": "2018-09-11T12:56:47.843-04:00"
},
"LastStdCost": {
"value": 0
},
"LotSerialClass": {
"value": "NOTTRACKED"
},
"Markup": {
"value": 0
},
"MaxCost": {
"value": 0
},
"MinCost": {
"value": 0
},
"MinMarkup": {
"value": 0
},
"MSRP": {
"value": 0
},
"PackagingOption": {
"value": "Manual"
},
"PackSeparately": {
"value": false
},
"PendingStdCost": {
"value": 0
},
"POAccrualAccount": {
"value": "20100"
},
"POAccrualSubaccount": {
"value": "CON000"
},
"PostingClass": {
"value": "CON"
},
"PriceClass": {},
"PriceManager": {},
"PriceWorkgroup": {},
"ProductManager": {},
"ProductWorkgroup": {},
"PurchasePriceVarianceAccount": {
"value": "52300"
},
"PurchasePriceVarianceSubaccount": {
"value": "CON000"
},
"PurchaseUOM": {
"value": "EA"
},
"ReasonCodeSubaccount": {
"value": "CON000"
},
"SalesAccount": {
"value": "40000"
},
"SalesSubaccount": {
"value": "CON000"
},
"SalesUOM": {
"value": "EA"
},
"StandardCostRevaluationAccount": {
"value": "52110"
},
"StandardCostRevaluationSubaccount": {
"value": "CON000"
},
"StandardCostVarianceAccount": {
"value": "52100"
},
"StandardCostVarianceSubaccount": {
"value": "CON000"
},
"SubjectToCommission": {
"value": false
},
"TaxCategory": {
"value": "TAXABLE"
},
"ValuationMethod": {
"value": "Average"
},
"VolumeUOM": {},
"WeightUOM": {},
"custom": {
"InventoryItemExt": {
"UsrSquareFTG": {
"type": "CustomDecimalField",
"value": null
},
"UsrDispPerPallet": {
"type": "CustomIntField",
"value": null
}
},
"InventoryItemExtension": {
"UsrItemClassCD": {
"type": "CustomStringField",
"value": null
}
},
"InventoryItemAMExtension": {
"AMReplenishmentSource": {
"type": "CustomStringField",
"value": "Purchase"
},
"AMLotSize": {
"type": "CustomDecimalField",
"value": 0
},
"AMMaxOrdQty": {
"type": "CustomDecimalField",
"value": 0
},
"AMMinOrdQty": {
"type": "CustomDecimalField",
"value": 0
},
"AMLowLevel": {
"type": "CustomIntField",
"value": 0
},
"AMMRPItem": {
"type": "CustomBooleanField",
"value": true
},
"AMMFGLeadTime": {
"type": "CustomIntField",
"value": 0
},
"AMGroupWindow": {
"type": "CustomIntField",
"value": 0
},
"AMConfigurationID": {
"type": "CustomStringField",
"value": null
},
"AMReplenishmentSourceOverride": {
"type": "CustomBooleanField",
"value": false
},
"AMSafetyStockOverride": {
"type": "CustomBooleanField",
"value": false
},
"AMSafetyStock": {
"type": "CustomDecimalField",
"value": 0
},
"AMMinQtyOverride": {
"type": "CustomBooleanField",
"value": false
},
"AMMinQty": {
"type": "CustomDecimalField",
"value": 0
},
"AMQtyRoundUp": {
"type": "CustomBooleanField",
"value": false
}
}
},
"files": []
}
答案 0 :(得分:0)
通常,自定义关键字是此记录中检索记录参数的一部分。
如果要为这些字段设置值,则需要先将该字段添加到端点。
以下是有关如何创建扩展端点的链接:
自定义端点和端点扩展
自定义字段
答案 1 :(得分:0)
您的请求正文的问题在这里:
"custom": {
"InventoryItemExt": {
"UsrSquareFTG": {
"type": "CustomDecimalField",
"value": 5.0
},
"UsrDispPerPallet": {
"type": "CustomIntField",
"value": 6
}
},
...
}
自定义字段集合应具有其他格式和键。
要使用其自定义字段获取正确的实体json模式,您可以使用get请求来访问http://localhost/acuroyalbay172100034/entity/Default/17.200.001/StockItem/ $ adHocSchema
它将返回包含自定义字段的json。您可以将其用作请求正文的模板。 另请参见Help
答案 2 :(得分:0)
看来,答案是必须扩展端点才能使用PUT更新数据。不能使用包含自定义字段作为集合的GET数据结构。