MobileCRM.FetchXml.Entity.orderBy - Resconet/JSBridge GitHub Wiki

Adds an order by statement to the fetch query.

Arguments

Argument Type Description
attribute String The attribute (CRM logical field name) to order by.
descending Boolean false, for ascending order; true, for descending order.

Following example creates the fetch entity for account with ascending order by "name" field.

var entity = new MobileCRM.FetchXml.Entity("account");
entity.addAttributes();
entity.orderBy("name", false);