This topic is locked

Add link to related table no longer working

6/1/2011 4:56:48 PM
PHPRunner General questions
hfg author

I had added a "Add Notes" link to a customer list that would take the user to the notes screen (a related table) and allow them to add a note. After upgrading the project from 5.1 to 5.2 this feature stopped working. It looks like it works, even showing the CUST_ID on the Add Notes screen, but when you save the CUST_ID is lost in the notes table, the rest of the note record is there, but the CUST_ID (the link field) is a 0.
Any ideas
Here are my notes on how I got it setup the 1st time.
------On the Sub-Tables Add Page - Before Process (Notes table):
global $strTableName;

if (@$_REQUEST["masterkey1"])

{

$_SESSION[$strTableName."_mastertable"] = "customer";

$_SESSION[$strTableName."_masterkey1"] = $_REQUEST["masterkey1"];

}
---------On the Master Tables List Page After Record Process Event (Customer Table):
global $record;
$record["ID_clean"]=$data["ID"];
-----On the Master Tables List page, use a link like this
http://10.0.0.3/apps/qatraffic2/notes_add.php?masterkey1={$ID_clean}
---What it does

Using the link on the Master Tables list page, a user can now add a record to the sub table (like Notes or Appts) with a single click.