I was trying to create a Pre Defined Query (PDQ) for an application user. Once the PDQ was ready the user asked to apply sorting on created date to the result. I added the sort criteria and ran the PDQ but to my utter surprise the result was not sorted. I tried doing all sort of changes to the PDQ but to no avail.
When I dug into Siebel tools I saw that the underlying Business Component already had a sort spec defined and that too on created date. I fired up my dedicated client with spool enabled to see what was happening at the DB. The SQL dump showed that when I explicitly applied the sort spec on UI (by clicking on the field label) it worked but it wouldn’t take the default sort spec defined on either BC or PDQ. After researching a bit more I found the reason for it.