[英]How to format LINQ query for Dynamics 365 c# plugin
I am looking to create ac# plugin that runs when a field is updated. 我正在寻找创建在字段更新时运行的ac#插件。 I am a little confused on how to format a LINQ query to interact with dynamics
我对如何格式化LINQ查询以与动态交互感到困惑
I have a Dynamics entity called bname_jobs
which I need to query. 我有一个名为
bname_jobs
的动力学实体,需要查询。
looking at some code currently sitting within the business the LINQ starts off with 查看LINQ中当前存在的业务中的一些代码
var processlineitems = from processLineItem in xrm.bname_processlineitemSet
My question is how do I find out the names of the entity I want to query in the above format 我的问题是如何以上述格式查找要查询的实体的名称
I need to fill in the x's in the below code 我需要在下面的代码中填写x
var jobs = from xxxx in xrm.bname_xxxxxxxx
To query a Dynamics 365 Entity ther are various ways. 要查询Dynamics 365实体,有多种方法。
When writing code in c# in most of the case, I have seen developers go with query expression. 在大多数情况下,用c#编写代码时,我已经看到开发人员会使用查询表达式。
Few examples with query expression and d365 几个带有查询表达式和d365的示例
Now how to find Entity name, in your context you are looking for entity schema name. 现在,如何查找实体名称,在您的上下文中,您正在寻找实体架构名称。
Go to CRM (UI)--> Advanced Settings--> Settings-->Customization-->Cutomize the system( It will open default solution)--> Entites on left hand side--> select your entity. 转到CRM(UI)->高级设置->设置->自定义->定制系统(它将打开默认解决方案)->左侧的实体->选择您的实体。
Images below will show you how to direct 以下图片将向您展示如何指导
In this case my Entity display name is "Case" but it's schema name is "incident". 在这种情况下,我的实体显示名称为“ Case”,但其架构名称为“ incident”。
This is what you need to query in your querexpression or fetchxml 这是您需要在querexpression或fetchxml中查询的内容
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.