[size="3"]I have three tabs on my application:[/size]
[size="3"]Table1 (master table)[/size]
[size="3"]Table2 [/size]
[size="3"]a dashboard tab (with contents of Table1 and Table2).[/size]
[size="3"]
In Table1, I have Add new and Edit enabled, and in dashboard I also checked off Add and Edit in the settings for Table1.[/size]
[size="3"]I have an afterAdd redirect event for Table1. When I add new records using Table1 tab, everything went well.
But If I used the Add button on dashboard, I will get an error shown in a red ribbon on the top "Server error
occurred. See details". When I click "See details", there is nothing. I figured out this has to do with the afterAdd
redirect event for Table1. When I remove the [/size]redirect event[size="3"], the error goes away.[/size]
[size="3"]The same is true with Edit pages if there is an [/size]afterEdit [size="3"]redirect event.
My question is: is there a way to discriminate Add pages initiated from different pages (regular Add from Table1 vs.
dashboard popup Add of Table1). I know with InlineAdd or InlineEdit, we have a preset variable $Inine to control the event
assignment. Is there a similar control to separate popupAdd from regular Add?
I tried this in the AfterAdd event but it did not work:[/size]
$popup=$pageObject->showAddInPopup;
if ($popup)
{
}
else
{
header("Location: my_redirect_page.php");
exit();
}
Please help. Thank you.