Sort order items of an itemtype by date (created_on property)


Is there any way in the configuration to retreive all items of an ItemType sorted by date (created_on property) when runing search.

otherwise i have developped a server method without success: 

Innovator inn = this.getInnovator();

Item Items = inn.newItem("name of the ItemType","get");

Items.setAttribute("orderBy", "[name of the ItemType].created_on desc ");

return Items.apply();

Any help please ?

  • Hi 

    small change in your code will do the trick.

    Innovator inn = this.getInnovator();
    Item Items = inn.newItem("Part","get");
    Items.setAttribute("orderBy", "item_number DESC");
    return Items.apply();

    Thank You

    Gopikrishnan R

  • Hi,
    Thanks for your reply.

    Can you tell me please which event should i applied to the method as i have tried with onBeforeUpdate, onBeforeAdd, onGet, onBeforeget, onAfterGet without success.

Reply Children
No Data