Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Hi,
I would suggest you to run your query with this "tool": http://world.episerver.com/blogs/Quan-Mai/Dates/2014/10/Order-searchmade-easy/
I think the SqlMetaWhereClause is not correct? Shouldn't it be "META.DocNumber IS NOT NULL"?
Regards,
/Q
I've just checked the DB and there are some rows in [OrderFormEx] which has value in field "DocNumber" for sure.
What is wrong?
Hi Quan,
Thanks for your fast responces.
I also thought of that but still no records. I will try the tool, and come back to you. thanks
Hi again,
I am really confused :)
I could make my query work, but with joining and putting everything in where clause. but I don't like it this way. Do you have any advice?
var searchOptions = new OrderSearchOptions { CacheResults = false, StartingRecord = 0, RecordsToRetrieve = 10, Namespace = "Mediachase.Commerce.Orders" }; OrderSearchParameters parameters = new OrderSearchParameters(); searchOptions.Classes.Add("PurchaseOrder"); parameters.SqlWhereClause =string.Format( "OrderGroupId IN (SELECT OrderForm.OrderGroupId FROM OrderForm LEFT OUTER JOIN OrderFormEx ON OrderForm.OrderFormId = OrderFormEx.ObjectId WHERE (OrderFormEx.DocNumber = '{0}' ))", DocNumber); var purchaseOrderCollection = OrderContext.Current.FindPurchaseOrders(parameters, searchOptions);
Hi,
I need to find orders which has a special metaField and I am using EPIServer 8.11.0.0. I tried Order Search described in this article. but it returns no row.
To make it simpler, I tried to find orders that the field is not null but still I there was no success. I know that I used the correct fields and classes since it returns data when I ask for "field is null".
Any Guidance?
//Returns purchaseOrderCollection[0]