當試圖讓我得到這個錯誤記錄如何獲得彙總查詢的結果自定義實體
The 'Rollup' method does not support entities of type 'new_X'.
這是我的代碼
RollupRequest req = new RollupRequest();
QueryExpression qe = new QueryExpression();
qe.EntityName = "new_x";
qe.ColumnSet = new ColumnSet(true);
req.Query = qe;
req.Target = new EntityReference("new_newpost", new Guid("xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"));
req.RollupType = RollupType.Related;
RollupResponse resp = (RollupResponse)xrm.Execute(req);
我怎樣才能得到彙總結果提前查詢
感謝
對於自定義實體,你可以做休耕
var rollupQuery = xrm.GoalRollupQuerySet.Where(c => c.Id == x.new_RecordstoRun.Id).First();
var result = xrm.RetrieveMultiple(new FetchExpression(rollupQuery.FetchXml));
但是 - 我如何添加一個「跳過」或「接受」 LINQ到這一點?
謝謝,看我的答案 – Yacov