简体   繁体   English

使用 Postman 的 D365 机会说明附件

[英]D365 Opportunity notes attachments using Postman

I need help with my JSON construct.我的JSON构造需要帮助。 I am attempting to attach the below base64 string and to bind an existing Opportunity in D365 - using postman我正在尝试附加以下 base64 字符串并绑定 D365 中的现有机会 - 使用 postman

WebApi Request : WebApi请求

POST:https://Mydomainurl.crm8.dynamics.com/api/data/v9.1/annotations发布:https://Mydomainurl.crm8.dynamics.com/api/data/v9.1/annotations

{
  "subject": "Test From Web API",
  "filename": "encoded oppjs.txt",
  "opportunity@odata.bind ":"/opportunity(0cff802f-23e1-40b3-aebc-b36b6d8d2e68)",
  "documentbody" : "DQp2YXIgdzMgPSB7fTsNCnczLmhpZGUgPSBmdW5jdGlvbiAoc2VsKSB7DQogIHczLmhpZGVFbGVtZW50cyh3My5nZXRFbGVtZW50cyhzZWwpKTsNCn07DQp3My5oaWRlRWxlbWVudHMgPSBmdW5jdGlvbiAoZWxlbWVudHMpIHsNCiAgdmFyIGksIGwgPSBlbGVtZW50cy5sZW5ndGg7DQogIGZvciAoaSA9IDA7IGkgPCBsOyBpKyspIHsNCiAgICB3My5oaWRlRWxlbWVudChlbGVtZW50c1tpXSk7DQogIH0NCn07DQp3My5oaWRlRWxlbWVudCA9IGZ1bmN0aW9uIChlbGVtZW50KSB7DQogIHczLnN0eWxlRWxlbWVudChlbGVtZW50LCAiZGlzcGxheSIsICJub25lIik7DQp9Ow0KdzMuc2hvdyA9IGZ1bmN0aW9uIChzZWwsIGEpIHsNCiAgdmFyIGVsZW1lbnRzID0gdzMuZ2V0RWxlbWVudHMoc2VsKTsNCiAgaWYgKGEpIHt3My5oaWRlRWxlbWVudHMoZWxlbWVudHMpO30NCiAgdzMuc2hvd0VsZW1lbnRzKGVsZW1lbnRzKTsNCn07DQp3My5zaG93RWxlbWVudHMgPSBmdW5jdGlvbiAoZWxlbWVudHMpIHsNCiAgdmFyIGksIGwgPSBlbGVtZW50cy5sZW5ndGg7DQogIGZvciAoaSA9IDA7IGkgPCBsOyBpKyspIHsNCiAgICB3My5zaG93RWxlbWVudChlbGVtZW50c1tpXSk7DQogIH0NCn07DQp3My5zaG93RWxlbWVudCA9IGZ1bmN0aW9uIChlbGVtZW50KSB7DQogIHczLnN0eWxlRWxlbWVudChlbGVtZW50LCAiZGlzcGxh"

}

Response : 501 Bad Request响应:501 错误请求

Try this json on: POST : https://Mydomainurl.api.crm8.dynamics.com/api/data/v9.1/annotations and let me know, you had a couple of things wrong note the odata.bind and how this binds to the opportunity in D365 you want to link too, that and you had some spacing issues in the pasted example as well: Try this json on: POST : https://Mydomainurl.api.crm8.dynamics.com/api/data/v9.1/annotations and let me know, you had a couple of things wrong note the odata.bind and how this绑定到您也想链接的 D365 中的机会,并且您在粘贴的示例中也遇到了一些间距问题:

{
    "subject": "Test From Web API", 
    "filename": "encoded oppjs.txt", 
    "isdocument" : true,
    "objectid_opportunity@odata.bind": "opportunities(0cff802f-23e1-40b3-aebc-b36b6d8d2e68)", 
"documentbody":"DQp2YXIgdzMgPSB7fTsNCnczLmhpZGUgPSBmdW5jdGlvbiAoc2VsKSB7DQogIHczLmhpZGVFbGVt ZW50cyh3My5nZXRFbGVtZW50cyhzZWwpKTsNCn07DQp3My5oaWRlRWxlbWVudHMgPSBmdW5jdGlv biAoZWxlbWVudHMpIHsNCiAgdmFyIGksIGwgPSBlbGVtZW50cy5sZW5ndGg7DQogIGZvciAoaSA9IDA7IGkgPCBsOyBpKyspIHsNCiAgICB3My5oaWRlRWxlbWVudChlbGVtZW50c1tpXSk7DQogIH0N Cn07DQp3My5oaWRlRWxlbWVudCA9IGZ1bmN0aW9uIChlbGVtZW50KSB7DQogIHczLnN0eWxlRWxlbWVudChlbGVtZW50LCAiZGlzcGxheSIsICJub25lIik7DQp9Ow0KdzMuc2hvdyA9IGZ1bmN0aW9u IChzZWwsIGEpIHsNCiAgdmFyIGVsZW1lbnRzID0gdzMuZ2V0RWxlbWVudHMoc2VsKTsNCiAgaWYgKGEpIHt3My5oaWRlRWxlbWVudHMoZWxlbWVudHMpO30NCiAgdzMuc2hvd0VsZW1lbnRzKGVsZW1l bnRzKTsNCn07DQp3My5zaG93RWxlbWVudHMgPSBmdW5jdGlvbiAoZWxlbWVudHMpIHsNCiAgdmFyIGksIGwgPSBlbGVtZW50cy5sZW5ndGg7DQogIGZvciAoaSA9IDA7IGkgPCBsOyBpKyspIHsNCiAg ICB3My5zaG93RWxlbWVudChlbGVtZW50c1tpXSk7DQogIH0NCn07DQp3My5zaG93RWxlbWVudCA9IGZ1bmN0aW9uIChlbGVtZW50KSB7DQogIHczLnN0eWxlRWxlbWVudChlbGVtZW50LCAiZGlzcGxh" 
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 访问jQuery注释器注释 - Access jquery annotator notes 使用 Postman 和 Soapui 我在到达 Spring 引导端点时得到 400,但 Swagger 没有问题 - Using Postman and Soapui I get a 400 when hitting a Spring Boot endpoint, but Swagger has no problem Postman 不支持请求方法“POST” - Request method 'POST' not supported in Postman PDF 注释/注释是否可以包含指向 PDF 中其他页面的链接? - Can PDF notes/annotations include links to other pages in the PDF? SpringBoot 中的 NullPointerException - 通过 postman 插入数据时映射 Hibernate - NullPointerException in SpringBoot - Hibernate mapping while inserting data through postman Microsoft Dynamics CRM-“电子邮件”选项卡中附件的注释(注)实体的文件大小属性与设置文件大小限制 - Microsoft Dynamics CRM - Annotation(Note) entity's filesize attribute vs set filesize limit for attachments in Email tab 如何解决此问题,我无法从 Postman 或浏览器访问我的 controller class 方法? - How can I resolve this issue, I am unable to access my controller class methods from Postman or Browser? 3D PDF acrobat javascript - 3D PDF acrobat javascript 3D 标注用于实例分割 - 3D annotation for instance segmentation ML的2d平面图(图像)数据集 - 2d floor plan (image) dataset for ML
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM