Hi all,
A little help please:
// Lookup Selecting event
function Lookup_Selecting($fld, &$filter)
{
// var_dump($fld->Name, $fld->Lookup, $filter); // Uncomment to view the filter
// Enter your code here
if ($this->PageID == "edit" && $this->Status->CurrentValue == 'U' ) {
if ($fld->Name == "Status") {
$fld->Lookup->setOptions([
["U", "...", "", "", ""],
["K", "To Manager", "", "", ""]
]); }
} else if ($this->PageID == "edit" && $this->Status->CurrentValue == 'K' ) {
if ($fld->Name == "Status") {
$fld->Lookup->setOptions([
["K", "...", "", "", ""],
["U", "Revoke", "", "", ""]
]); }
}
}
The above code is not working because the $this->Status->CurrentValue is giving null value.