Adding a conditional button to the left container

Hi all,

I've added a button to the left container of the orders page labelled 'Update quote costs'. The button is visible on the condition that the boolean 'Recalculation required' (a field on the order) is true. I've added the diff and the method to the section schema and the section page.

(edit - added gif of button)


When I open the page from the section for a record where 'Recalculation required' is true, the button does not appear. If I refresh the page, the button then does.


I believe this is because the header loads before the data so when it first loads, it can't read the 'Recalculation required' field.

Is there a solution to this? If not, I can move the button to the header container as the conditions do work this way. It just doesn't look as good.

Nb. using Freedom shell on classic pages

Like 0




The problem is not in the container, when you open a page from a section, the system still thinks that you see a section page. Therefore, the condition for your button isn't applied.

In order to fix it, you need to create your button in a combined mode, for example.

Take a look at the button and its condition is defined in a SectionV2 page as well as PageV2.

Show all comments