cancel
Showing results for 
Search instead for 
Did you mean: 

Extending SalesOrder Query search on MSR 2.0

Former Member
0 Kudos

Hi all,

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][0] = queryFactory.createCondition( searchKeys<i>, 
                                                                      criteriaTypes<i>, 
                                                                     tmpSearchCondition<i>.getDateValue());

Does anybody know another way to fullfill this goal?

Thanks in advance,

GB

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

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).

Thank you,

Julien.

msc mobile Canada

http://www.msc-mobile.com

Former Member
0 Kudos

Hi Julien,

thank you. I adopt your suggestion by using of a composite query applied on the DATE_DOC self.

Now I reach the goal.

Kindly reagrds,

GB

Answers (0)