Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The first parameter of the method api.find() is always a Type Code. This short code identifies the entity to search. The most common type codes you will encounter are the following ones: 

Type Code

Description


P

Product Master

PXProduct Extension (see Searching in Product Extensions below)
CCustomer Master
CXCustomer Extension
PLPrice List
PLIPrice List Item
MPLManual Price List
MPLIManual Price List Item
PGLive Price Grid
PGILive Price Grid Item

CA

Customer Assignments
QQuote

For the full list of type codes, see Type Codes.

For searching in Price Parameters, you should almost exclusively use specialized methods api.findLookupTable and api.findLookupTableValues. For more details see Searching see Searching in Price Parameters below.

Using Attribute Names in Searches

...

  • The number of rows the method api.find can return is limited by a server parameter. It is configurable per partition and by default it is set to 200. You can retrieve the max rows by calling api.getMaxFindResultsLimit. Read how  Read how to overcome this limitation belowlimitation below.
    (info) A warning is displayed if the number of returned rows returned equals 200 or formulaEngine.script.findMaxResults and the maxRows parameter of the find was not specified (=0). 
  • When filtering the attributed fields (attribute1, ..., attribute30), you need to pass strings to filters because all attributed fields are stored in the database as strings. This is mainly an issue with Dates. Find out how out how to convert them properly below.
  • Because of the previous point, you cannot use sorting on numbers (integers, real) because api.find returns and sorts the data as strings. When sorting ($100, $70, $25) ascending, the result will be ($100, $25, $70).

...