Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Sample events > Appearance

Show data from a master table on the detail view/edit/add page

Scroll Prev Next More

 

Show data from a master table on the details View/Edit/Add pages.

 

To add this event, insert PHP code snippet on the Page Designer screen:

 

global $pageObject;
echo "Master Info<br>";
if ($data = $pageObject->getMasterRecord())
 {
  echo "Field1: ".$data["Field1"]."<br>";
  echo "Field2: ".$data["Field2"]."<br>";
 }

 

For example, "Orders" is a master table and "Order details" is a details table.

 

global $pageObject;
echo "Order Info<br>";
if ($data = $pageObject->getMasterRecord())
 {
  echo "Customer: ".$data["CustomerID"]."<br>";
  echo "Employee: ".$data["EmployeeID"]."<br>";
 }

 

See also:

getMasterRecord

RunnerPage class

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software