Extending SalesOrder Query search on MSR 2.0
I need to extend query search for sales order by adding a date range (FROM - TO in place of a single date field DATE_DOC). But the DATE_DOC_HIGH custom field has not a FieldDescriptor so it's not possible to call:
searchKeys<i> = getFieldDescriptor("DATE_DOC_HIGH"); //->>returns an Exception
(where 'i' is the Condition number index)
It's possible to clone the FieldDescriptor of the standard field DATE_DOC, and modify its KEY and VALUE in order to fill it with those of DATE_DOC_HIGH?
The standard code that run the query is this:
conditions[j] = queryFactory.createCondition( searchKeys<i>, criteriaTypes<i>, tmpSearchCondition<i>.getDateValue());
Does anybody know another way to fullfill this goal?
Thanks in advance,
I am not sure I am getting the question. Normally you have to create to condition on the date field one with DATE > input date 1 and DATE < input date 2.
You create a composite condition and query with it directly. No need for a custom field as they cannot be used for querying (if they are not in the syncbo def).
msc mobile Canada