結果の行の並べ替え順序を指定します。
FetchXml を使用して行を並べ替える方法について説明します。
Example
次の使用例は、 createdon、 name、および accountnumber の値によって、アカウント レコードを昇順で返します。
<fetch>
<entity name='account'>
<attribute name='name' />
<attribute name='accountnumber' />
<attribute name='createdon' />
<order attribute='createdon' />
<order attribute='name' />
<order attribute='accountnumber' />
</entity>
</fetch>
Attributes
| 名前 | 必須ですか? | Description |
|---|---|---|
attribute |
イエス | データを並べ替える属性要素のname。 |
alias |
いいえ | データを並べ替える属性要素のalias |
descending |
いいえ | データを降順で並べ替えるかどうか。 |
entityname |
いいえ | この属性を使用して、最後に適用されないように link-entity 要素の並べ替え順序を指定します。
entity要素内のorderで、entitynameをlink-entityのalias値に設定します。
最初に link-entity 注文を適用する方法について説明します |
親要素
| 名前 | Description |
|---|---|
| 実体 | フェッチ要素の子 要素 (クエリの "親エンティティ") を指定します。 許可されるエンティティは 1 つだけです。 |
| link-entity | エンティティまたはリンク エンティティに関連するテーブルを結合して、結果を含む追加の列を返します。 また、 フィルター 要素と共に使用して、 関連テーブルの列値に条件を適用します。 |