public EntityCollection GetEntityInfo()
{
DateTime dt = DateTime.Now;
var today = dt.ToString("yyyy-MM-dd");
EntityCollection result = _context.Service.RetrieveMultiple(
new QueryExpression
{
EntityName = Account.EntityLogicalName,
ColumnSet = new ColumnSet(new[] { "name" }),
NoLock = true,
Distinct = true,
LinkEntities = {
new LinkEntity
{
LinkToEntityName ="new_entity1",
LinkFromEntityName ="account",
LinkToAttributeName ="account",
LinkFromAttributeName ="accountid",
EntityAlias =ENTITY1,
JoinOperator =JoinOperator.Inner,
Columns = new ColumnSet(new[] {"name","detail","response_date"}),
LinkCriteria ={
Conditions ={
new ConditionExpression("possible_flg",ConditionOperator.Equal,false),
new ConditionExpression("response_date",ConditionOperator.LessThan,today)
}
},
LinkEntities = {
new LinkEntity
{
LinkToEntityName ="new_entity2",
LinkFromEntityName ="new_entity1",
LinkToAttributeName ="share",
LinkFromAttributeName ="shareid",
EntityAlias =ENTITY2,
JoinOperator =JoinOperator.Inner,
Columns = new ColumnSet(new[] {"createdby", "team", "user", "processid"}),
LinkCriteria ={
Conditions ={
new ConditionExpression("possibility",ConditionOperator.Null)
}
}
}
}
}
},
});
return result;
}
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme