私は以下のようなコードを持っています:
QueryExpression query = new QueryExpression();
query.EntityName = "new_callistyorder";
ColumnSet col = new ColumnSet("new_nomororder","new_customer");
query.ColumnSet = col;
EntityCollection colect = service.RetrieveMultiple(query);
string str = string.Empty;
foreach (Entity e in colect.Entities)
{
if(e.Contains("new_nomororder")){
str = str + e.Attributes["new_nomororder"].ToString();
}
}
throw new InvalidPluginExecutionException(str);
このコードをたどってください。Microsoft 動的エンティティからデータを取得できます。今、私は最大のIDを持つデータを取得したいと考えています。SQL クエリの場合、次のようになります。queryexpression でそれを行うにはどうすればよいですか? ありがとう