I have the following global relationship:
globalmatterno_to_matter
globals.matterno to Matter table matterno field
the global is set properly and I can see all the fields in the related Matter file record.
Now consider the following code (assume globals.TEMatterNo has a value):
//findTimeorExpenses[TEList]
if (globals.TEMatterNo)
{
globals.matterno = globals.TEMatterNo
globals.TEMatterID = globalmatterno_to_matter.matterid
forms.TETime.findTime()
}
controller.showRecords(foundset)
//findTime[TETime]
controller.find()
servicetype = globals.cTimeKey
if ( globals.TEStatus )
{
timestatus = globals.TEStatus
}
if ( globals.TETimekeeper )
{
timekeeperid = globals.TETimekeeper
}
if ( globals.matterno )
{
matterid = globals.TEMatterID
}
controller.search(true, false)if ( !controller.recordIndex )
{
answer = plugins.dialogs.showErrorDialog( ‘No Time Records Found’, ‘There are no Time records found for the given search criteria’, ‘OK’)
}
Now, if when you go through the code there are no records found, there is also no link to the global relationship. The field globalmatterno_to_matter.matterid always comes back as zero - even though globals.matterno has a value. The link will not be re-established until a search is performed that yields a foundset.
Is this normal? Am I missing something?