Dear Community,
As per the link : https://community.creatio.com/questions/sort-detail-page-load
we implemented sorting by date time when the detail loads the first time.
Method 1
addGridDataColumns: function(esq) {
this.callParent(arguments);
// add sorting column
var ModifiedOnColumn = esq.addColumn("ModifiedOn", "ModifiedOn");
ModifiedOnColumn.orderPosition = 0;
ModifiedOnColumn.orderDirection = Terrasoft.OrderDirection.DESC;
}
Method 2 :
getGridDataColumns: function() {
var gridDataColumns = {
"ModifiedOn": {path: "ModifiedOn", orderPosition = 0
orderDirection: Terrasoft.OrderDirection.DESC}
};
return gridDataColumns;
}
Observations : if orderposition is mentioned, manual sort by user does not happen.
Removing order position and implementing any of the above methods, sorts the records, but once user does a manual sort, say by Name, the next time user logs in, the detail records are sorted by Name and not by the default sort condition "ModifiedOn"
Is there a way to enforce sort when user logs in and also allow manual sort by user?
Thanks in advance!