We are using quotes entity and have a related custom entity with sub grid visible to this entity on quote form.
We want to replace the standard "New" button in subgrid to open a custom page and add data in the related entity with a modern command "New" button, and show/ hide this button based on a field in quote record.
Unfortunately all blogs etc. are showing only how you can show/ hide buttons on the main grid/ main form, with conditions based on field values, but for this always a record must be selected/ opened.
Is there a way to have a visibility rule for subgrid? Something like: if field in quote abc_example = "Visible" than show "New" command in subgrid, else not.
We've tried everything, the enable rules (via command checker) always shows "false", so it seems that Self.Selected.Item... doesn't work for subgrid.
Any ideas? Ribbon Workbench could be a solution, but if there's a way to sue modern commands we would prefer this.
Thanks for any hints.
M.