Dynamically changing a ComboBox EpiFilter based on other fields

I want to change a Combo control’s EpiFilter based on another control on the form.

End goal is to limit the Part Class drop down on the PO Line in PO Entry, when the purchase type is “Other” (PUR-UKN tran type). The PartClass table has been extended with a column “ExpOnly_c” - a boolean field.
I can manually edit the EpiFilters property of the cmbPartClass control (a default/built-in control) with:

PartClass.ExpOnly_c=TRUE

But I’d like that EpiFilter value to be blank, and only gets set with the above, when the user selects Buy For: “Other”, and to remove the filter when Buy For is anything but “Other”

So I have two major objectives:

  1. Detecting when the Buy For is changed to “Other”
    A trace run while changing the Buy For from Stock to Other (required when buying a non-inventory item) shows the Erp.Proxy.BO.POImpl Business Object, with the ChangeDetailTranType method, getting triggered.
    How can I detect that in a form customization?

  2. Setting the cmbPartClass control’s EpiFilter, and refreshing the list after the filter update.

There is a YouTube video on this. And it doe not require any code. I saw it for E9 some time back, but the principles should be the same . You can search for it.

Vinay Kamboj

Here is the link to the video

You’re good, you found the video 2 days befor it was uploaded! :wink:

image

1 Like