function CustomFunction() {
global $g_BizSystem;
$prtForm = $g_BizSystem->GetObjectFactory()->GetObject($this->m_ParentFormName);
echo $prtForm->m_ActiveRecord['Id']; //THIS works fine.
$prtForm = $g_BizSystem->GetObjectFactory()->GetObject($prtForm->m_ParentFormName);
echo $prtForm->m_ActiveRecord['Id']; //THIS returns "" (empty string). ...
...
}
I'm creating that on BizFormPopup.php, @/openbiz/bin/.
That function is called every time I hit "Add" on a popup. Pretty much like the AddToParent() function, already existent.
My view has a parent form (FM_FAMILIES), with a subform (FM_PEOPLE_Sub). If asked to return $prtForm->m_ParentFormName on the second line, it works fine, showing (FM_FAMILIES). If asked to return $prtForm->m_Title on the fourth line, it works fine too, showing the title for "FM_FAMILIES" - which means the form was successfully accessed. I have a valid selected record on FM_FAMILIES, which made FM_PEOPLE_Sub show its related records. By clicking on "Add", on FM_PEOPLE_Sub, it was supposed to pop a popup where I could add a record to FM_PEOPLE_Sub. Seeing they're not related in a M-M or M-1 fashion, I can't do this. Hence my custom function on BizFormPopup.php.
My table "tblpeople" has a "family_id" field, which I'm trying to modify. I need to return the selected family ID, tho.
for ($i=0; $i<=sizeof($prtForm)-1; $i++)
echo "prtForm[$i] = '$prtForm[$i]'<br>" ;
Return:
prtForm[0] = ''
prtForm[1] = '' prtForm[2] = '' prtForm[3] = '' prtForm[4] = '' prtForm[5] = '' prtForm[6] = '' prtForm[7] = '' prtForm[8] = '' prtForm[9] = '' prtForm[10] = '' prtForm[11] = '' prtForm[12] = '' prtForm[13] = '' prtForm[14] = '' prtForm[15] = '' prtForm[16] = '' prtForm[17] = '' prtForm[18] = '' prtForm[19] = '' prtForm[20] = ''
|
|||

I figured it out. Help is no
I figured it out. Help is no longer needed, heh.
Thanks.
$prtForm =
$prtForm = $g_BizSystem->GetObjectFactory()->GetObject($prtForm->m_ParentFormName)->GetActiveRecord() is the function returning an empty array. I just checked, and in my exemple above I'm using the array itself.