Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Proofreading

...

Warning

When using this form of the function:

find(String typeCode, int startRow, int maxRows, String sortBy, List<String> fields, Filter ... filters)

i.e., the one with the "fields" parameter,  you get back "full objects" which are transferred through type conversion.

If you do not use the "fields" parameter, you get only raw data for attributeXX fields, which is always a string. That means you will get a hashmap where all values are strings – if you have numbers in the table, you will get back a string!

...

Code Block
languagegroovy
titleSyntax of specific search methods
productExtension(String extensionName, Filter ... filters)      // searches product extensions
customerExtension(String extensionName, Filter ... filters)		// searches customer extensions
findLookupTable(String tableName)								// searches price parameter tables
findLookupTableValues(String tableName, Filter ... filters) 	// searches price parameter tables' values
productCompetition(Filter ... filters) 							// searches competition data
productXRef(Filter ... filters) 								// searches product references

findManualPricelists(Date targetDate, String listName)			// searches manual price pricelistslists
findPriceGrids(Date targetDate, String priceGridName)			// searches live price grids
findPricelists(Date targetDate, String listName)				// searches price pricelistslists
count(String typeCode, Filter ... filters) 						// retrieves number of records in an entity

...

Type Code

Description


P

Product Master

PXProduct Extension (see Searching in Product Extensions)
CCustomer Master
CXCustomer Extension
PLPricelistPrice List
PLIPricelist Price List Item
MPLManual PricelistPrice List
MPLIManual Pricelist Price List Item
PGLive Price Grid
PGILive Price Grid Item

CA

Customer Assignments
QQuote

...

Code Block
languagegroovy
titleapi.find()
api.find("PX", Filter.equal("name", "GLOBAL.ListPrices"), Filter.greaterOrEqual("attribute1", api.targetDate().format("yyyy-MM-dd"))) 

Searching in Price/Company Parameters

Again, there are two ways to search in Price/Company Parameters (PP). If you do not need advanced features, you should always use the method api.findLookupTableValues().

...

Sometimes, however, you need to use an advanced featuresfeature. In such cases, you need to specify the ID of the lookup table as a filter.

...

The type code differs per price/company parameter type. The following table summarizes when to use which code.

...

If you use a date in your filter, there is one thing you need to be aware of when filtering attributed fields with Date or Timestamp type (i.e., attribute1, attribute2, ... attribute30). Since the values in attributed fields are stored as strings in the database, you need to convert your Date object into a proper String representation. The comparison in the database is then lexicographical but because it follows formatting standards it works well.

...