Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 9 Next »

Single Items view

There’s only a single flexible view in the Items tab. The default view looks similar to Tree View. To achieve the Table View like layout, consider using hideSiderPanel or defaultPlacement parameters of the Items tab. More in https://pricefx.atlassian.net/wiki/spaces/KB/pages/3980492805/Detail+Page+Layout+and+Dynamic+Tabs#Widget-Parameters.

You need to manually set up the preferences for the Items table. Ember preferences are not used in React for Items table. In React QuoteEditor_TableTreeView and similarly named preferences are used, in Ember it’s either QuoteEditor_Overview or QuoteEditor_TableView.

Data and new endpoints

There’s a new set of endpoints that are used in React: /clicmanager.*. The main difference is that header and line items data are never sent together. We needed this to be able to support thousands of line items. So, for example. /clicmanager.fetchheader and /quotemanager.fetch return similar responses, but the new one has no line items and includes ioMeta to know which inputs and outputs are used by the line items. You can get line items with /clicmanager.fetch that acts as a standard paginated listing.

New endpoints are described in the API documentation:https://api.pricefx.com/openapi/reference/pricefx/tag/Clicmanager/

Persisted vs. temporary data

In “Autosave off” mode (manual save), data is first stored to the temporary objects on the backend first. When the user clicks the Save button, the data is moved from the temporary objects to the persisted objects. Even before the user saves the document for the first time, the data is already stored in the temporary objects. There are different type codes used for the temporary objects compared to the persisted ones (e.g. Q vs. QTMP for quotes). This may affect the Groovy logic in some cases.

  • api.currentItem() returns temporary object in “Autosave off” mode.

  • Be careful with api.find(), you may need to compose and use the “real” typedId instead of the typedId of the temporary data.

  • In “Autosave off” mode, the line items also have a different type code: QLITMP instead of QLI.

Interceptors

The interceptors used in Ember and React are not compatible. In React, the interceptors have been greatly improved. They can be written by configuration engineers and there is no need to redeploy the application if the new code exists. If you use interceptors in Ember, please contact CSM to coordinate interceptors migration to React.

Documention for the interceptors used in React:

Loops and inline configurators

With autosave on, it’s possible the inline configurators will get to the loop state. There could be more reasons, but it’s usually solvable by adding HIDDEN inputs for attributes that do not represent an input editable by the user. The list of such inputs is displayed in the developer console:

configurator-loop.png

def hiddenInputs = [ "office", "customer", "distributionChannel", "sku", "targetDateLineItem" ]

def ce = api.createConfiguratorEntry()
for (name in hiddenInputs) {
  api.inputBuilderFactory()
    .createHiddenEntry(name)
    .addToConfiguratorEntry(ce)
}

return ce

The next possible reasons for such loops is the input value that is changing every time when the configurator logic is executed, like showing a current timestamp. You either need to make it HIDDEN or remove it.

Related docs

/wiki/spaces/product/pages/3920232899

  • No labels