button from repeater's item navigate to dynamic page

On the repeater’s page
// Trying to push button7 and go to dynamic page
import wixLocation from ‘wix-location’;
$w(“#button7”).onClick( (event) => {
let item = $w(“#dataset1”).getCurrentItem();
let mask = item.maskName;
// We customized the URL for the plan’s page
// when we made it dynamic.
wixLocation.to(‘/deals/’+mask);
})

The button is not reacting.
The repeater page called “Deals”
The dynamic pages for each item link are as https://www.site.com/deals/ maskName The

Thanks in advance,
Tatiana

Just simply connect your “Get Company Profile” button link with your dynamic page field in “Deals” database as you connected your other repeater items with “Deals” dataset simply do this for button link as well and connect that with your dynamic page field.

You don’t need to write code for this :slight_smile: