This topic is locked

Custom button in record to show customer data

11/23/2021 10:17:45 PM
ASPRunner.NET General questions
erosolmi author


I have a grid of customer data.
On the the fields in my Customer table contains a link to a customer data detail info page of my web site.

If I create a link field in the grid that directly open the link all is working fine

If I try to add a custom button in the grid for each record to have a popup window following indications here "SHOW 'VIEW CUSTOMER' BUTTON ON EACH ROW OF ORDERS LIST PAGE" button is OK but when I click it always shows a popup with the link contained in the first record of the grid.

It seems it is not getting current record.

What can I check?

Sergey Kornilov 11/29/2021

In button's Server code use getCurrentRecord function to access the data of the current record.

erosolmi author 11/29/2021

Yes, I used getCurrentRecord and followed examples but no way to get the link of the current record, always of the first record.

At some time I thought that the page is not working because it contains many deleted button tentative I did: when I add a new button it ask if I want to "insert or copy an existing one" listing all my previous tentative buttons. And maybe building the project is influenced by some code removed.
Is there way to "clean" the list page and remove all unused code?

I'm using ASPRunner.NET Enterprise 10.6 build 38243

Sergey Kornilov 11/29/2021

Just in case make sure that this table has a correct key column selected. If getCurrentRecord() always points to the first record in the table this may point to the issue with the key column. Unused/deleted buttons are unlikely to be an issue.

erosolmi author 11/30/2021

Maybe you got it.

Table is a CustomView connected to a MSSQL View. There is a field that is an unique ID.
Also I modified SQL to calculate some additional fields and added 7 "Additional WHERE Tabs"

But when I go to "Pages" in AspRunner "Choose key columns" has no fields inside it to choose from.

Sergey Kornilov 11/30/2021

This sounds strange and I think you need to contact support directly to resolve this.