AI OnAI Off
After some good input from EPiServer Support I finally foudn out how to see what values that can be used for sorting:
Either use Luke to open the search index and view the documents or
run the following code to get the documents from Commerce searchmanager
SearchManager m = new SearchManager(Mediachase.Commerce.Core.AppContext.Current.ApplicationName);
var res = m.Search(criteria);
var doc = res.Documents[0];
Is there a way to sort entries by their built-in properties like price, name, created. Tried using some of the names of these but can't get it to work. The only thing that I got working was creating another custm filed with the same data and sort on that. That works for text properties but not so well on prices since the price can be changed and then the custom field is not updated.
I create the SearchSort like this:
And then Im building a criteria with that and performs a regular search like this:
What name should I use for the built in properties if it is possible to use them in sorting?