Customize where clausule on detailed search launch

When you click on the lens icon when you want to view the detailed search on a desired grid row, this takes the values in where clausure using the main grid displayed fields. I’d like to customize this query, due never returns valid data in my case. I’d like to set the where by using the unique primary id, not the rest of fields.

SOLVED! The solution takes place into Detail->settings section (in GRID configuration), you can select in DETAIL KEYS the id you want to use for the detailed search query, the most important is the main primary key, select at least one