Clientside GlideRecord - orderBy(String column)

Specifies an orderBy column. May be called more than once to order by multiple columns.

Table 1. Parameters
Name Type Description
column String The column name to be used to order the result set.
Table 2. Returns
Type Description
void
function UpdateProjectWBS(project) {
  var count = 0;
  var child = new GlideRecord('pm_project_task');
  child.addQuery('parent', project.sys_id);
  child.orderBy('order');
  child.orderBy('number');
  child.query(childResponse);
  g_form.addInfoMessage(count + ' Project Tasks updated');
}
 
function childResponse(child) {
  var len = child.getRowCount().toString().length;
  var seq = 0;
  while (child.next()) {
    count += UpdateProjectTaskWBS(child, 1, ++seq, len, '');
  }
}