In order to add any logic to the page, please create a replacing module schema for LocalDuplicateSearchPageV2 schema. The button of interest is called "IsNotDuplicateAction" button. The save method, which is triggered on Save button click is saveBtnClick. You can override the basic logic, so to hide/show button up to your needs.
i was created the replacing schema for that but it was still showing that button on contact page . can you please help me on this code Here the code.
Thank you for your response. I have tried to debug my method, I have put breakpoint into function and it haven't hit the breakpoint. Method probably isn't executing. I also have cleared the cache, but it haven't helped. I don't know where is the problem.
Here is code of my schema.
Does the button display when you hardcode "true" into the visibility property in the diff? Maybe the issue is with the button insert or its positioning.
Yes, when I set it to "true", button is visible.
I apologize, I haven't payed attention, that this is an active row of the grid.
The active row in the grid has its own viewmodel. Each section in the system is inheriting active row configuration from the BaseGridRowViewModel.
Therefore, since it is a custom section, in order for the bindings to work you need to create a new module, inherit from the BaseGridRowViewModel. In the schema, you need to add the logic for visibility property.
Please take any other grid row VewModel as an example.
Hope you will find it helpful.
thank you for your response. My custom viewModel had to inherit from
BaseSectionGridRowViewModel, because I want keep standard buttons (open, copy, delete,...). Now it works.
Thank you so much.
I am also facing same scenario, any example how the custom viewmodel will look like, how the logic for visibility property will look like?
Implementation of such viewmodel can be found in oob schemas. For example, "ActivitySectionGridRowViewModel" in package "UiV2". Then, in "ActivitySectionV2" in package "NUI", viewmodel is imported http://prntscr.com/nc64s3 and it will be used instead of BaseSectionGridViewModel.
The example how to bind visibility property can be found in Anastasia`s answers above.
Hi Alex, thanks for your reply. Do you have any example how I can add the visibility property in my grid row view model and bind it to the data active row button on my section?
As I said earlier, example can be found in configuration.
For example: ProcessRunButton (BaseDataView schema, package NUI)