如何从jitterbit对Salesforce进行Web服务调用

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

我是Jitterbit的新手,我想根据条件更新salesforce中的记录,但需要使用Web服务来执行此操作。

使用Web服务我想从salesforce获取记录的id作为响应,然后该响应将用作其他操作的源。

但我不知道如何使用Jitterbit向salesforce发出请求。

请帮帮我。

web-services salesforce jitterbit
1个回答
0
投票

我不知道你是否仍然需要这个,但在这里我会怎么做。您可能想要创建一个脚本并将操作运行到SF。

任何操作(成功)都将能够返回一个ID,如果您分析响应对象(双击Web服务响应对象),然后在目标面板上,展开TARGET:NameOfResponse - > flat - > response。如果您打开响应,Jitterbit将使用公式构建器打开,在这里您将找到一个脚本:

<trans>
// This mapping is part of a Salesforce wizard.
// Modifying it may cause the wizard to malfunction.
If(root$transaction.response$body$createResponse$result.success$ == false,
    WriteToOperationLog(SumString(root$transaction.response$body$createResponse$result.errors#.message$, ". ", false)))
</trans>

由于这只是另一个脚本,您可以添加一个全局变量并检索ID($ MyGlobalVariable):

<trans>
// This mapping is part of a Salesforce wizard.
// Modifying it may cause the wizard to malfunction.
If(root$transaction.response$body$createResponse$result.success$ == false,
    WriteToOperationLog(SumString(root$transaction.response$body$createResponse$result.errors#.message$, ". ", false))
    ,
    $MyGlobalVariable = root$transaction.response$body$createResponse$result.id$)
</trans>

因此在脚本中,您在运行操作后引用ID:

<trans>
      RunOperation("<TAG>Operations/TheOperation</TAG>");
      WriteToOperationLog($MyGlobalVariable);
</trans>
© www.soinside.com 2019 - 2024. All rights reserved.