
Hi all,
I'm new to AX,
My question is, in the SalesTable Form, i have 2 customised fields(Destination port and Fumigation number) both are lookup fields.
If the destination port(fumigation is yes/checked) then the Fumigation number is set to FUM-Yes,
If the destination port(fumigation is no/unchecked) then the Fumigation number is set to FUM-No,
i tried to use modified event of the field, but i'm not getting the correct logic. can someone help me with code.,
Thank you!
If "Fumigation number" has just two values, why don't you use a boolean field / checkbox control? Then you could filter "Destination port" just by setting a correct table relation, without writing any code.
If code is needed, you need to create a lookup method for "Destination port" and add a query range for "Fumigation" field, where you'll use the value of "Fumigation number" field. For example, look at How To Override An Existing Lookup Method: Event Handler.
By the way, please ask questions about D365FO in a D365FO. e.g. Dynamics 365 Finance.