Dynamic Selection not working on modal add

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
ebinnasir
User
Posts: 74

Dynamic Selection not working on modal add

Post by ebinnasir »

Hello,

I am facing issues on master-detail edit on modal window. In the detail table there are a lookup field which is collecting data from gray_requisition_detail table by filtering master table field gray_requisition_master_id and customer_name. I created a button on view page of a table by the below codes:

$item = &$this->OtherOptions['action']->Add("Roll Management");
    $item->Body = "<a class='btn btn-default ew-action ew-edit' title='Roll Management' data-caption='Edit' href='../grayrequisitionmasteredit/" . $this->gray_requisition_master_id->CurrentValue . "?showdetail=rollmgt'><i data-phrase='fa-solid fa-pen' class = 'icon-edit ew-icon' data-caption='Roll Management'></a>";
    $item->Visible = true;

The above code opening link in the same window and detail table lookup field is working properly for previously added data and newly adding data.

But, problem is occuring when i am trying toopen link in modal window. At the same view page, I created a button on view page by the below codes:

$item = &$this->OtherOptions['action']->Add("Roll Management");
$item->Body = "<a class='btn btn-default ew-action ew-edit' title='Roll Management' data-ew-action='modal' data-btn='null' data-caption='Roll Management' data-url=../grayrequisitionmasteredit/" . $this->gray_requisition_master_id->CurrentValue . "?showdetail=rollmgt&showmaster=gray_requisition_master'><i data-phrase='ViewLink' class = 'fa-solid fa-capsules ew-icon' data-caption='Roll Management'></a>";
$item->Visible = true;

The above code opening master-detail edit in modal dialog but the lookup field is empty while adding new record. I saw that previously added data of lookup field is showing in the field and in the list also. When i tried to add new data by adding new row then in the lookup field no value is in the list.

Use Lookup Cache : enable
lookup cache count: 100
lookup cache enable page: list,grid,edit,add,gridadd

Can experts suggest me how to solve this issue?

Thanks in advance.


mobhar
User
Posts: 11493

Post by mobhar »

Are you using v2024? If so, could you please reproduce the issue by using demo2024 project? You may use orders as master table, and orderdetails as detail table.


arbei
User
Posts: 8765

Post by arbei »

  1. You tried to open Master/Detail-Edit in modal dialog, I don't think it is supported yet.
  2. You have "?showdetail=rollmgt&showmaster=gray_requisition_master", you cannot use "showdetail" and "showmaster" at the same time.

Post Reply