Mule 4上传到Salesforce的附件输入示例

问题描述 投票:0回答:1

我想要从Mule 4上传文件到Salesforce附件。我使用了类型=“附件”的创建处理器。 Create处理器的输入结构和附件类型是什么?

我在创建之前尝试过这个转换:

%dw 2.0
output application/java
---
{
    ParentId: payload.TicketAttachmentID,
    Name: "test.bin",
    Body: payload.FileData
}

我希望Salesforce中的上传附件。但是Mule 4在Create步骤上返回错误:

Internal execution exception while executing the script, this is most probably a bug, file an issue with the script and the input data.
Caused by:\njava.nio.charset.UnmappableCharacterException: Input length = 1
salesforce mule attachment
1个回答
2
投票

尝试以下方法:

%dw 2.0
output application/json  <-- this could be the issue
---
{
    ParentId: payload.TicketAttachmentID,
    Name: "test.bin",
    Body: payload.FileData
}
© www.soinside.com 2019 - 2024. All rights reserved.