我是Jitterbit的新手,我想根据条件更新salesforce中的记录,但需要使用web服务来完成此操作。
使用web服务,我希望从salesforce获得记录的id作为响应,然后该响应将用作其他操作的源。
但我不知道如何使用Jitterbit向salesforce发出请求呼叫。
请在这方面帮帮我。
发布于 2019-04-18 04:40:05
我不知道你是否还需要这个,但这是我该怎么做的。您可能希望创建一个脚本并对SF运行该操作。
任何(成功的)操作都将能够返回一个ID,如果您分析了响应对象(双击Web Service响应对象),那么在目标面板上,展开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>https://stackoverflow.com/questions/53755624
复制相似问题