In the Backoffice, there is a default limit for exporting the list to CSV that is set through <setting> element. For example, the Cronjobs has a default limit of 500. In some cases, we would want to export more than 500, but the setting limits us. In this post, I will explain how we can update this from Backoffice Orchestrator.

Default limit

As mentioned, Cronjobs export CSV in Hybris Backoffice is set to 500:

export to CSV default pop up
Image showing the default limit when exporting

Updating the limit (safety threshold)

We can do this by either adding the below code to the Backoffice config xml file or add it directly through Backoffice Orchestrator. We will be adding it through Backoffice Orchestrator in this post.

Open up Backoffice Orchestrator

Open up Backoffice Orchestrator by pressing F4:

Backoffice Orchestrator view
Backoffice Orchestrator view

Open up cockpit-config.xml

Click on Show cockpit-config.xml:

Add the code to update the limit

For performance and testing sake, we will update the threshold to 700. Add the following code inside the <config> element:

<context component="listviewactions" type="Cronjob">
    <y:actions xmlns:y="http://www.hybris.com/cockpit/config/hybris">
        <y:group qualifier="common">
            <y:action action-id="com.hybris.cockpitng.listview.action.export.csv" property="exportColumnsAndData">
                <y:parameter>
                    <y:name>confirmation.threshold</y:name>
                    <y:value>700</y:value>
                </y:parameter>
            </y:action>
        </y:group>
    </y:actions>
</context>

Understanding our code to update the limit

In the above code, we targeted the Cronjob type since we want to update the limit of export CSV for Cronjobs.

Next, we are targeting the action com.hybris.cockpitng.listview.action.export.csv since this action is responsible for exporting the CSV.

Next, we are changing the parameter confirmation.threshold to have the value of 700 for performance sake.

Exporting the CSV with updated threshold

Now, if we try to export the Cronjobs, we can see the label updated:

Export CSV popup showing updated threshold
Export CSV popup showing updated threshold

Download the file and you should be able to see 700 entries.

Finally, for all of my posts in SAP Commerce (Hybris) are here.


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *