UiPath Documentation
activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

传统“集成”活动

更新 ServiceNow 记录

UiPath.ServiceNow.Activities.UpdateRecord

“更新 ServiceNow 记录”活动使用 ServiceNow表格 - PUT API 更新特定记录 ( sys_id )。

After updating the record, the activity outputs the status of the request (success/failure information) in a ResponseStatus object (ServiceNowStatus) that you can use in subsequent activities (e.g., conditional logic).

提示:

此活动包提供三种不同的方法来更新记录:更新 ServiceNow 记录更新插入记录插入导入集记录“更新 ServiceNow 记录”和“更新或插入记录”活动使用 REST API 直接写入生产表。插入导入集记录活动使用 REST 导入集 API 写入导入集表,数据会从中转换为目标生产表。为避免直接在生产表中更新记录,建议您使用插入导入集记录活动更新新记录。有关详细信息(包括对导入集性能进行故障排除),请参阅 ServiceNow 文档中的导入集。要了解有关使用导入集的更多信息,请参阅 ServiceNow 文档中的网页服务导入集使用导入集导入数据

工作方式

以下步骤和消息序列图是活动从设计时(即活动依赖项和输入/输出属性)到运行时如何工作的示例。

  1. 完成设置步骤。
  2. “ServiceNow 作用域”活动添加到您的项目中。
  3. Add the Update ServiceNow Record activity inside the ServiceNow Scope activity.
  4. Click the Configure button inside the Update ServiceNow Record activity (this opens the Object Wizard).
  5. Select the Object that you want to update and enter, at a minimum, the sys_id of the record.
  6. 为“输出”属性创建并输入 ResponseStatus 变量。
    • 您的输入属性值将发送到“表格 - PUT” API。
    • API 会将 ResponseStatus 值返回到您的输出属性变量。

在活动正文中

To enter your Update ServiceNow Record property values, you must use the Object Wizard by clicking the Configure button.

要了解有关对象向导的更多信息,请参阅业务活动框架页面。

  • sys_id - 要更新的 ServiceNow 记录的 ID。要获取sys_id值,您可以采用 ServiceNow唯一记录标识符 (sys_id)文档中显示的其中一种方法,也可以在 ServiceNow 用户界面中右键单击该记录,然后在弹出菜单中选择“复制 sys_id”选项。

属性

备注:

如果您看不到所选对象的属性列表,即使选择了“添加多个字段”选项,您可能也没有足够的权限在 ServiceNow 中查看对象元数据和修改数据。有关更多详细信息,请参阅权限问题故障排除

高级

  • AdditionalFields - A DataRow that includes the columns and values that you want to update. The column names must match the names as they appear in the ServiceNow database table for the selected object type.

常见

  • “显示名称”- 活动的显示名称。此字段仅支持 StringsString 变量。

其他

  • “私有”- 选中后将不再以“Verbose”级别记录变量和参数的值。

输出

  • ServiceNowStatus - The status of the request (success/failure information). Enter a ResponseStatus variable (UiPath.BAF.Models.ResponseStatus). The ResponseStatus object includes three properties that you can use in other activities.
    • Success - Boolean - Specifies whether the API request was successful.
    • ErrorCode - String - The response error if the API request is unsuccessful (Success=False).
    • Message - String - The error message.

示例

下图显示了活动依赖关系和输入/输出属性值的示例。

有关分步说明和示例,请参阅快速入门指南。

  • 工作方式
  • 在活动正文中
  • 属性
  • 高级
  • 常见
  • 其他
  • 输出
  • 示例

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新