Displaying form as a lookup field

Hi All,

I’m trying to display the form “HcmWorkerLookUp” as a lookup field. The HcmWorkerLookUp form has few filter fields on the top on selecting which will display the list of workers as per the filter criteria selected.

I would like to know that is there any way to make the filter fields invisible on the HcmWorkerLookUp form during runtime? (i.e) i dont want to alter the form properties to make them disable.if so how can it be done?

Please help.



You can make use of \Classes\HcmWorkerLookup(which finally calls the HcmWorkerLookup form) which has some static methods to filter data as well as to enable the filter in the look up form.

Example: \Classes\HcmWorkerLookup\newOnlyActiveWorkers to show only the active workers

\Classes\HcmWorkerLookup\new has parameters to lock the filters(to disable the parameter).

Look at \Forms\HcmWorkerLookUp\Methods\init , for how these parameters are used.

You can modify this as per your requirement.

Thanks Kranthi!

In our AX 2012 application, Worker in the Service Order Form has 3 finance dimension: State, Branch and Department. These 3 new dimension are new fields in the SMAServiceOrderTable.

How can I apply these, State, Branch and Department in the worker 's filter?

I tried added parmIncludeemployees_State but it effected all others form.

Thank you in advance,