简体   繁体   English

如何使用C#插件将逗号分隔的多文本值添加到cm 2015中的选项集和查找字段

[英]How to add multitext values seperated by commas to optionset and lookup field in cm 2015 using c# plug-in

I have a plug-in. 我有一个插件。 This plug-in should get the values seperated by commas from multitext field one by one and stores to an optionset field. 该插件应将逗号之间的值与多文本字段一一对应,并存储到选项集字段中。 And also this plugin should get values(ids) from multitext field seperated by comma and searches the ids one by one in lookup field values. 并且此插件还应从逗号分隔的多文本字段中获取值(id),并在查找字段值中一一搜索ID。 If found (the search operation should be done one by one in a loop;since there will be more thean one id to search), the value should be seen in the lookup field. 如果找到了(搜索操作应该一个循环一个接一个地进行;因为将有更多的一个id进行搜索),所以应该在查找字段中看到该值。 After theese opertaions the plugin should save the entity. 在这些操作之后,插件应保存实体。

How can i do this in crm 2015 using c# visual studio plug-in? 我如何在CRM 2015中使用C#Visual Studio插件执行此操作? Can anyone help me please 谁能帮我

So, in a nutshell, what do you want to do is to generate the CRM metadata dynamically from a comma separated input, like a CSV? 因此,简而言之,您要做什么是从逗号分隔的输入(例如CSV)动态生成CRM元数据?

Have a look at the CreateOptionSetRequest and InsertOptionSetValueRequest in CRM, this will allow you to insert new option set values for a given option set. 看一下CRM中的CreateOptionSetRequestInsertOptionSetValueRequest ,这将允许您为给定的选项集插入新的选项集值。

Those will allow you to dynamically create an option set field, and populate option set values for that field, respectively. 这些将使您能够动态创建选项集字段,并分别填充该字段的选项集值。

For lookups, If I understood correctly, you can link records to each other using AssociateRequest messages. 对于查找,如果我理解正确,则可以使用AssociateRequest消息将记录彼此链接。

Hope this helps 希望这可以帮助

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

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