Microsoft Daynamics WebApi - 导航属性“bpf_quoteid”没有扩展值,也没有“odata.bind”属性注释

问题描述

我正在尝试通过 Dynamics 365 WebApi 将报价链接到 bpf 实例:

const data = {
            "bpf_quoteid@data.bind": "/" + SelectedEntityTypeName + "s(" + SelectedControlSelectedItemReferences[0].Id.replace('{','').replace('}','') + ")"
        }

        Xrm.WebApi.updateRecord(BpfName,Bpf.businessprocessflowinstanceid,data).then(
            function success(result) {
                console.log("Instance of " + BpfName + " updated");
            },function (error) {
                console.log(error.message);
            }
        );

结果我收到这个错误(400):

验证输入参数时出错:Microsoft.OData.ODataException:导航属性“bpf_quoteid”没有扩展值,也没有“odata.bind”属性注释。请求中没有扩展值的导航属性必须有“odata.bind”属性注解。

其余的错误信息:

在 Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.ReadPropertyWithoutValue(IODataJsonLightReaderResourceState resourceState,String propertyName) 在 Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.c__displayClass9_0.b__0(PropertyParsingResult propertyParsingResult,String propertyName) 在 Microsoft.OData.JsonLight.ODataJsonLightDeserializer.Processproperty(PropertyAndAnnotationCollector propertyAndAnnotationCollector,Func'2 readPropertyAnnotationValue,Action'2 handleProperty) 在 Microsoft.OData.JsonLight.ODataJsonLightResourceDeserializer.ReadResourceContent(IODataJsonLightReaderResourceState resourceState) 在 Microsoft.OData.JsonLight.ODataJsonLightReader.StartReadingResource() 在 Microsoft.OData.JsonLight.ODataJsonLightReader.ReadResourceSetItemStart(PropertyAndAnnotationCollector propertyAndAnnotationCollector,SelectedPropertiesNode selectedProperties) 在 Microsoft.OData.JsonLight.ODataJsonLightReader.ReadAtStartImplementationSynchronously(PropertyAndAnnotationCollector propertyAndAnnotationCollector) 在 Microsoft.OData.ODataReaderCore.ReadImplementation() 在 Microsoft.OData.ODataReaderCore.InterceptException[T](Func`1 action) 在 System.Web.OData.Formatter.Deserialization.ODataReaderExtensions.ReadResourceOrResourceSet(ODataReader reader) 在 System.Web.OData.Formatter.Deserialization.ODataResourceDeserializer.Read(ODataMessageReader messageReader,Type type,ODataDeserializerContext readContext) 在 System.Web.OData.Formatter.ODataMediaTypeFormatter.ReadFromStream(Type type,Stream readStream,HttpContent content,IFormatterLogger formatterLogger)

在我的例子中查找字段的架构名称都是小写的

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...