Skip to Content
avatar image
Former Member

Extending SalesOrder Query search on MSR 2.0

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Oct 15, 2008 at 12:00 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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