Delete record from table VIEW

I have read all the forum posts I can find on the key word “UpdateTable”.

I have updated my ‘Page_Load’ function of the “Delete Page” section in the view itself to reflect:
$this->UpdateTable = “regdetails”;
…where ‘regdetails’ is the actual table I want to be updating / deleting a record from.

The view is called ‘t_regmerch’ and it uses same schema as the table from which it views. The primary keys are identical. The view includes two joins that are simply there as lookups to display the friendly name of an id in two of the fields. The table (‘regdetails’) on which this view is based uses the exact same lookup fields.

I am only trying to delete the record in one table - the ‘regdetails’ table.

The strange part:
If I load the view itself in my browser (i.e. t_regmerchlist.php ) -I can successfully delete the target record from the main table (i.e. the “UpdateTable” a.k.a. ‘regdetails’)
However, this view is meant to be a ‘details’ view of a master table called ‘registrations’. (i.e. registrationsedit.php?showdetail=t_regmerch&regid=164)
And from there, if I try to delete the same record, I get the classic “Can not delete from join view” “1395” error.

Why am I able to delete the record form the single view page, but not when it’s nested as a master/detail view?

I really appreciate your help because I’ve been at this all day.
-Cheers,

As the event name suggests, Page_Load is an event for that particular page only (not for any other pages using the same table), your UpdateTable is not set up for the detail table in registrationsedit.php, e.g. you may try Page_Load or Page_Render server event, e.g.

$GLOBALS[“t_regmerch”]->UpdateTable = “regdetails”;

Thank you for the reply. I appreciate the advice.