Create Link to open Edit Page of a Record

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
aspsteve
User
Posts: 52

Create Link to open Edit Page of a Record

Post by aspsteve »

I am trying to create link that opens the Edit page of link field value of any record with the Table List (PosProductSalesList)

Table Name: PosProductSales

Displayed Field = Collect Payment

Settings for Displayed Field with Hard Coded Value (This works when I test with a hard coded value)
HREF = PaymentLink
Original Field Value = Checked
Target=_Self
Prefix=None
Suffix= /7710135?showdetail=

Settings for Displayed Field with SalesJournalID Value of the Record (Throws an Error Message "No records found")
HREF = PaymentLink
Original Field Value = Checked
Target=_Self
Prefix=None
Suffix= /@UrlEncode(CurrentPage.SalesJournalID.CurrentValue)?showdetail=

Appreciate your help to correct the Suffix Code for SalesJournalID Value of the Record


MichaelG
User
Posts: 1110

Post by MichaelG »

Think of your final hyperlink URL as three part (prefix, value and suffix) and put that in the hyperlink settings.

For example, if the hyperlink should be "/tableedit/<key>?showdetails=", and <key> is the HREF field value, set HREF = hyperlink field, prefix = "/tableedit/" and suffix = "?showdetails=".


aspsteve
User
Posts: 52

Post by aspsteve »

Thank you for the information

However, when I use the following syntax, it opens up the first record on the edit page instead of my selected record

HREF = hyperlink field, prefix = "/tableedit/" and suffix = "?showdetails=".

I need it to open up the edit for the specific record like

HREF = hyperlink field, prefix = "/tableedit/" and suffix = "key?showdetails=".

Where key value is the value in field = SalesJournalID

That was why i tried the initial syntax

/@UrlEncode(CurrentPage.SalesJournalID.CurrentValue)?showdetail=

key> is the HREF field value, set HREF = hyperlink field, prefix = "/tableedit/" and suffix = "?showdetails=".


MichaelG
User
Posts: 1110

Post by MichaelG »

The HREF field should be the key field.


aspsteve
User
Posts: 52

Post by aspsteve »

Thank you very much.

This worked!


Post Reply