...
Get the current processed item (e.g., product):
Code Block language groovy api.currentItem()
Sometimes this does not work in the debug mode; then you can use:
Code Block language groovy if (!api.isDebugMode()) { return api.currentItem() }
Code Block language groovy def currentItem = api.currentItem() != null ? api.currentItem() : api.getProduct(api.product("sku"))
- Get the attribute of the current product:
- formula:
Product("MatNr. 8 Stellen")
- Groovy:
api.product("MatNr. 8 Stellen")
- formula:
- Get the parameters for CFS:
return api.option("Add Products to Price Grid","Yes","No")?:"Yes"
Track the progress when running:
Admin > Job/TaskTracking > find CFS by its ID
...
- To look up a certain row:
- formula:
VLookup(“<PP table name>", “<key of the desired row>")
- Groovy:
api.vLookup("Cockpit_Teile", "Value", "Teile")
- formula:
Iterate through all rows:
Code Block language groovy def values = api.findLookupTableValues("Reaktivierte_Stati") if (values) { for (v in values) { def a = v.name def b = v.attribute1
...
This sample shows how to set values in additionalInfo[1,2,3] attributes (Extra Info columns) on quotes Quotes and contracts Agreements/Promotions via the header logic.
Code Block | ||
---|---|---|
| ||
//Contract header logic (PromotionManager) cProcessor.updateField("ROOT", "additionalInfo3", "some text") //Quote header logic (QuoteConfigurator) quoteProcessor.updateField("ROOT", "additionalInfo3", "some text") |
Get
...
Value of
...
Another Element of the Pricing Logic
Code Block | ||
---|---|---|
| ||
api.getElement("<element_name>") |
Get
...
Attribute Value by Name
Code Block | ||
---|---|---|
| ||
api.getPropertyByElementName(pgi, "SomeLabel") |
...