gpt4 book ai didi

Dynamics 365 BC - Add Purchase Invoice attachment and note using API(Dynamic 365 BC-使用API添加采购发票附件和备注)

转载 作者:bug小助手 更新时间:2023-10-28 10:42:57 58 4
gpt4 key购买 nike



We manipulate purchase data in Dynamics 365 BC using API to update, receive and invoice PO lines.
(Dynamics 365 Plugin parse Note attachment XML without using file)
We now want to upload an invoice document as an attachment to purchase invoice and add/update attachment notes using API.
We did not find any documented API to do that.

我们使用API在Dynamic 365 BC中处理采购数据,以更新、接收和开具采购订单行。(Dynamic 365插件在不使用文件的情况下解析附注附件XML)我们现在希望将发票文档作为附件上传到采购发票,并使用API添加/更新附件附注。我们没有找到任何记录在案的API来执行此操作。


We've looked at the attachement API https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/resources/dynamics_attachment
but it never return values:

我们已经查看了附加API https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/resources/dynamics_attachment,但它从未返回值:


Call example: {{baseUrl}}/companies({{companyId}})/attachments?$filter=parentId eq bf4eb7ea-d558-ec11-bb7c-000d3a2b9aee and parentType eq 'Purchase Invoice'

调用示例:{{baseUrl}}/companies({{companyId}})/attachments?$filter=parentId eq bf4eb7ea-d558-ec11-bb7c-000d3a2b9aee和parentType eq‘采购发票’


Always returns:

始终返回:


{
"@odata.context": "api.businesscentral.dynamics.com/.../$metadata
"value": []
}

but this Purchase Invoice is valid and has attachment (not found in attachment table but in 'Document Attachment' table)
And no idea on how to get 'Attachment Notes'

但这张采购发票是有效的,有附件(不是在附件表中,而是在文件附件表中),并且不知道如何获得‘附件笔记’


Any suggestion would be greatly appreciated !
Thanks,
Vincent

任何建议将不胜感激!谢谢,文森特


更多回答

What have you tried so far?

到目前为止,你尝试了什么?

I updated the question with add info

我用添加信息更新了问题

Any luck with this? I'm also trying to retrieve/update notes inside the Fact table side pane

这件事有什么进展吗?我还在尝试检索/更新事实表侧窗格中的注释

joshanglesea.wordpress.com/2021/01/25/…

Joshanglesea.wordpress.com/2021/01/25/…

优秀答案推荐

the APIs mentioned are not implemented in Business Central at this time.

此时Business Central中未实现上述API。


If you think this would be a great improvement to the product itself it's greatly appreciated if you submit an idea at https://aka.ms/bcideas. If you've done so, please link the idea in your question. Thanks in advance.

如果你认为这将是对产品本身的一大改进,如果你在https://aka.ms/bcideas.上提交一个想法,我们将非常感激如果你已经这样做了,请将这个想法与你的问题联系起来。先谢谢你。


At this point, you would need to add the custom APIs yourself, including one for the "Record Links" and another for the "Document Attachment" source table. An example for the "notes" could look like this:

此时,您需要自己添加自定义API,包括一个用于“记录链接”的API和一个用于“文档附件”源表的API。“备注”的示例如下所示:


page 50100 "API - Notes"
{
PageType = API;
APIPublisher = 'publisher';
APIGroup = 'group';
APIVersion = 'v1.0';
EntityName = 'note';
EntitySetName = 'notes';
DelayedInsert = true;
SourceTable = "Record Link";
ODataKeyFields = SystemId;

layout
{
area(Content)
{
group(records)
{
field(id; Rec.SystemId) { }
field(linkID; Rec."Link ID") { }
field(recordID; Rec."Record ID") { }
field(note; Rec.Note) { }
field(lastModifiedDateTime; Rec.SystemModifiedAt) { }
}
}
}
}

Note: you might want to look at the powerful SBI Data Braider extension: https://sparebrained.com/appsource/databraider/. A great solution to bypass the need to create and customize APIs yourself via AL code. All this is managed via the web client.

注意:您可能想看看功能强大的印度国家统计局数据编织器扩展:https://sparebrained.com/appsource/databraider/.一个很好的解决方案,可以绕过通过AL代码自己创建和定制API的需要。所有这些都是通过Web客户端进行管理的。


If this question is still relevant, I would also like to follow up with an example of the "Document Attachment" scenario.

如果这个问题仍然相关,我还想用一个“文件附件”场景的例子来跟进。


更多回答

58 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com