简体   繁体   English

在 Kingswaysoft Dynamics 365 Toolkit 中使用 GUID 作为输入执行文本查找

[英]Performing Text Lookup with GUID as an input in Kingswaysoft Dynamics 365 Toolkit

In Kingswaysoft's Dynamics 365 Integration Toolkit, is there any way to lookup/match CRM ownerid GUID from source table to a custom column in destination's user entity?在 Kingswaysoft 的 Dynamics 365 Integration Toolkit 中,是否有任何方法可以将 CRM ownerid GUID 从源表查找/匹配到目标用户实体中的自定义列?

My problem我的问题

For some reason, I have to perform a text lookup from source entity's ownerid field to destination user entity's new_legacyuserid custom column that holds user GUIDs from the source system.出于某种原因,我必须从源实体的ownerid字段到目标用户实体的new_legacyuserid自定义列执行文本查找,该列保存来自源系统的用户 GUID。 But it seems like the Text Lookup Editor doesn't match source ownerid with new_legacyuserid column in the destination user entity, but matches if I pass owneridname column as an input.但似乎文本查找编辑器不匹配源ownerid与目标用户实体中的new_legacyuserid列,但如果我将owneridname列作为输入传递则匹配。

I have pre populated the new_legacyuserid with a single GUID from the source as a fallback user indication and this column is null for all other records.我已经使用来自源的单个 GUID 预先填充了new_legacyuserid作为后备用户指示,对于所有其他记录,此列是 null。 So all the records' ownerid should fallback to the default user.所以所有记录的ownerid都应该回退到默认用户。

Now, when I pass ownerid as an input to the Text Lookup (please see the image below) the package fails with the following error:现在,当我将ownerid作为文本查找的输入(请参见下图)时,package 失败并出现以下错误:

{"error":{"code":"0x80040217","message":"systemuser With Id = be33cd29-671b-e511-80ce-005056ae320c Does Not Exist"}} {“错误”:{“代码”:“0x80040217”,“消息”:“ID = be33cd29-671b-e511-80ce-005056ae320c 的系统用户不存在”}}

However, to test differently, when I pass owneridname as an input to the TextLookup, the package runs successfully and all the two records ownership falls back to the default destination user.但是,为了进行不同的测试,当我将owneridname作为输入传递给 TextLookup 时,package 运行成功,并且所有两条记录的所有权都回退到默认目标用户。

I want to perform the same match using ownerid and not owneridname .我想使用ownerid而不是owneridname执行相同的匹配。

在此处输入图像描述

I didn't find any way to use user GUID (OwnerId in this case) in the Text Lookup Editor.我没有找到在文本查找编辑器中使用用户 GUID(在本例中为 OwnerId)的任何方法。 It seems that when GUID is passed as an input, the KWS adapter doesn't look at the Text Lookup Editor at all.似乎当 GUID 作为输入传递时,KWS 适配器根本不查看文本查找编辑器。

One of my colleague tried this workaround and this worked.我的一位同事尝试了这种解决方法,并且奏效了。 You can try that if your source CRM is on-premises.如果您的源 CRM 在本地,您可以尝试这样做。

  • Create a derived column in SQL select statement (OwnerIdString) to store GUID as a string在 SQL select 语句 (OwnerIdString) 中创建派生列以将 GUID 存储为字符串
  • Use OwnerIdString column as input使用 OwnerIdString 列作为输入

Example:例子:

SELECT task.*, convert(VARCHAR(36), ownerid) AS OwnerIdString FROM task SELECT task.*, convert(VARCHAR(36), ownerid) AS OwnerIdString FROM task

This will force the Kingswaysoft adapter to do a Text Lookup based on GUID.这将强制 Kingswaysoft 适配器基于 GUID 进行文本查找。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM