Overriding an existing query

To override an existing query, take the following steps:

Procedure

  1. Determine which constant represents the query you wish to customize. For the basic structure of each constant, see Structure of a constant in the query class.
  2. Use the Workbench to generate a subclass of the BObjQuery that implements that query.
  3. Modify the SQL statement in the InquiryData interface that was generated with your BObjQuery.
  4. Determine the order and type of parameters the existing query requires. See your BObjQuery's superclass for more information.
    In cases where the parameters are not used in exactly the same order and number, you will need to implement the provideSQLParams() method to process the parameters you need for your new query in the order required by your new SQL statement. Some queries require business object as input, for example, Party/Contract Search. As such, business objects are provided to the BObjQuery classes as named parameters (see the map namedParameters on the AbstractBObjQuery class) rather than in the positional parameters List.
    Note: Customizing or modifying any one particular query constant changes the way this query constant is invoked anywhere it is currently used in the product.