You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Acumatica Purchase Receipt上传附件后更新报错Sequence Contains No Matching Elements

Acumatica采购收据更新异常问题

前提说明

  • 所有操作均通过Postman直接向Acumatica发送请求完成。
  • 未给采购收据(Purchase Receipt)上传附件时,可正常更新任意采购收据;在Acumatica中为采购收据上传附件后,就无法再更新该收据,且会返回「Sequence Contains No Matching Elements」错误,上传附件操作未主动修改其他配置。

请求示例

以下是将采购收据收货数量更新为33的PUT请求体,已确认未上传附件时可正常执行,上传附件后请求失效:

{
    "id": "d5c53b1c-0b06-ed11-8312-0a72f5e849b2",
    "rowNumber": 1,
    "note": {
        "value": ""
    },
    "BaseCurrencyID": {
        "value": "CAD"
    },
    "BillDate": {
        "value": "2021-08-25T00:00:00+00:00"
    },
    "Branch": {
        "value": "BOE"
    },
    "ControlQty": {
        "value": 2.000000
    },
    "CreateBill": {
        "value": false
    },
    "CurrencyEffectiveDate": {
        "value": "2020-12-29T00:00:00+00:00"
    },
    "CurrencyID": {
        "value": "CAD"
    },
    "CurrencyRate": {
        "value": 1.00000000
    },
    "CurrencyRateTypeID": {},
    "CurrencyReciprocalRate": {
        "value": 1.00000000
    },
    "Date": {
        "value": "2021-08-25T00:00:00+00:00"
    },
    "Details": [
        {
            "id": "d5c53b1c-0b06-ed11-8312-0a72f5e849b2",
            "rowNumber": 1,
            "note": {
                "value": ""
            },
            "Account": {
                "value": "5000"
            },
            "AccrualAccount": {
                "value": "2000"
            },
            "AccrualSubaccount": {
                "value": "000"
            },
            "Branch": {
                "value": "BOE"
            },
            "Description": {
                "value": "Cost of Purchase"
            },
            "EditableUnitCost": {
                "value": true
            },
            "EstimatedINExtendedCost": {
                "value": 312.0000
            },
            "ExtendedCost": {
                "value": 312.0000
            },
            "FinalINExtendedCost": {},
            "InventoryID": {
                "value": "E10003"
            },
            "LineNbr": {
                "value": 1
            },
            "LineType": {
                "value": "Non-Stock"
            },
            "OpenQty": {
                "value": 0.0
            },
            "OrderedQty": {
                "value": 1.000000
            },
            "POLineNbr": {
                "value": 1
            },
            "POOrderNbr": {
                "value": "000003"
            },
            "POOrderType": {
                "value": "Normal"
            },
            "POReceiptLineNbr": {},
            "POReceiptNbr": {},
            "ReceiptQty": {
                "value": 33.000000
            },
            "Subaccount": {
                "value": "000"
            },
            "TransactionDescription": {
                "value": "Ladder - 24' Aluminum Extension Ladder"
            },
            "TransferOrderLineNbr": {},
            "TransferOrderNbr": {},
            "TransferOrderType": {},
            "TransferShipmentNbr": {},
            "UnitCost": {
                "value": 22.0000
            },
            "UOM": {
                "value": "EA"
            },
            "custom": {}
        }
    ],
    "Hold": {
        "value": true
    },
    "Location": {
        "value": "MAIN"
    },
    "PostPeriod": {
        "value": "082021"
    },
    "ProcessReturnWithOriginalCost": {
        "value": false
    },
    "ReceiptNbr": {
        "value": "000138"
    },
    "Status": {
        "value": "On Hold"
    },
    "TotalCost": {
        "value": 213.0000
    },
    "TotalQty": {
        "value": 2.000000
    },
    "Type": {
        "value": "Receipt"
    },
    "UnbilledQuantity": {
        "value": 2.000000
    },
    "VendorID": {
        "value": "GROPWA"
    },
    "VendorRef": {},
    "custom": {},
    "files": [
        {
            "id": "6f621043-a8z4-4a89-b34f-910d399e31c0",
            "filename": "Purchase Receipts (RT, 000138)\\Sample.txt",
            "href": "/entity/Purchasing/20.200.001/files/6f621043-a8z4-4a89-b34f-910d399e31c0"
        }
    ]
}

错误响应

{
    "message": "An error has occurred.",
    "exceptionMessage": "Sequence contains no matching element",
    "exceptionType": "System.InvalidOperationException",
    "stackTrace": "   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)\r\n   at PX.Api.ContractBased.EntityExportContextBuilder.ExtractFieldMappingKeyForDetail(String mappingKey, EntityField field, EntityMappingProjection[] entityFields, IMetadataProvider metadataProvider, IEntityMappingKeyService entityMappingKeyService, String endpointName, String version)\r\n   at PX.Api.ContractBased.EntityExportContextBuilder.EntityFieldsOrderComparer.Compare(EntityField x, EntityField y)\r\n   at System.Linq.EnumerableSorter`2.CompareKeys(Int32 index1, Int32 index2)\r\n   at System.Linq.EnumerableSorter`1.QuickSort(Int32[] map, Int32 left, Int32 right)\r\n   at System.Linq.EnumerableSorter`1.Sort(TElement[] elements, Int32 count)\r\n   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()\r\n   at PX.Api.ContractBased.EntityExportContextBuilder.BuildPutCommands(EntityImpl entity, String mappingKey, Boolean newEntity, EntityMappingProjectionWrapper[] orderedMappedFields, ISet`1 preProcessedFields, Boolean isDetail)\r\n   at PX.Api.ContractBased.EntityExportContextBuilder.BuildContextForPutOrInvoke(EntityDescriptor descriptor, Boolean isNewEntity, Action`2 appendActionsDelegate)\r\n   at PX.Api.ContractBased.EntityService.Put(ISystemContract systemContract, String version, String name, EntityImpl entity, CbOperationContext operationContext, Boolean throwOnError)\r\n   at PX.Api.ContractBased.Soap.SoapFacadeBase.PutImpl(EntityImpl entity, Boolean throwOnValidationError)\r\n   at PX.Api.ContractBased.SystemContracts.V2.RestController.PutEntity(EntityImpl entity, String select, String filter, String expand, String custom)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()"
}

内容的提问来源于stack exchange,提问作者Colen Liu

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.06 10:09:03