Dear All,
How to restrict the Duplicate And Empty value in Lookup in Select Query field of Dialog ?
Thanks in Advance.
The Inquiry form is completely generic, generating lookups from table relations. If you want a custom lookup, add a field to your dialog (in the same way as Log Number field), override lookup method and implement your logic there. Then take value and add it as a range to the query at runtime.
Thanks Martin,
I saw one question in Community dynamics Forum regarding the same. In that forum, you have mentioned, it will be achieve by some customization (check below link) and also you have suggested the same what you mentioned in last reply.
community.dynamics.com/…/141742
is there possible means, please suggest the way to get this…/
Thanks in advance.
You technically can modify SysQueryForm class and put custom logic there, but it’s for all queries across the whole AX. You’re not changing how lookups for all queries are generated; you want a custom lookup in a single dialog. Therefore you logic belongs to your dialog and not to SysQueryForm.
If you just would like to do filtration on the duplicate and empty value, you can make the join with the primary table of the field in your query so that lookup field will be the field of the primary table instead of the child table like now.
Thanks Nasheet.
I did the same. But it is filtered All the records from the parent table.
But i have confused with CustInvoiceTable. I have created one query using CustInvoiceTable with InvoiceAccount & InvoiceId as range. Basically InvoiceAccount repeated in invoices.
When select Lookup in inquiry, InvoiceAccount are unique. Not duplicated.
How its works on CustInvoiceTable??