Introduction
RequirementQuery the above intersect entity and check if there is any work order associated to the case. If yes, we want to get the workorderid.
SolutionAs said we can’t query intersect entity directly, but we can query it using case or work order. In our case, we will be querying it with the case entity. We are going to use QueryExpression class here and will be using its AddLink method to get the data from the intersect entity. We can use the following code.
Now, to get the workorderid, we need to use AliasedValue class here. For example, to get the first workorderid, we need to use the following code.
Hope it will help someone!