Hello,
I need a little help. In my project, i am working on master-detail table where 1 master table(finish_fabric_receive) is connected with 2 detail tables( finish_fr_insights & finishfab_return). Multiple detail table is not enabled here. I created two otheroptions button for seperate master-detail add. In the master table a static lookup field named activities_type. I want when user open finish_fabric_receive & finish_fr_insights (master-detail) add form then user get only Fabric Receive as the option and when user open finish_fabric_receive & finishfab_return (master-detail) add form then user get 2 option like Fabric Return and Batch Return. For this I put the below codes on Table Specific->Lookup_Selecting of master table:
if (CurrentPageID() == "add") {
if ($this->getCurrentDetailTable() == "finish_fr_insights") {
if ($fld->Name == "activities_type")
$fld->Lookup->UseLookupCache = false;
$fld->Lookup->setOptions([
["Fabric Receive", "Fabric Receive"]
]);
}
else if ($this->getCurrentDetailTable() == "finishfab_return") {
if ($fld->Name == "activities_type")
$fld->Lookup->UseLookupCache = false;
$fld->Lookup->setOptions([
["Fabric Return", "Fabric Return"],
["Batch Return", "Batch Return"]
]);
}
}
I see that, what ever add form open then user get last 2 select option. but if i refresh add form then actual select open appear. Same case is happening on both form. Can experts please help me to find out the mistakes?
Regards