Notifications
Announcements
No record found.
Hello all,
How to get a lookup on a dialog field using SysOperation Framework.
Where we can write the code to get.
Thank You
Siddhant Singh
*This post is locked for comments
Hi Siddhant Singh,
It can be done using registerOverrideMethod, please refer for details devexpp.blogspot.com/.../dynamics-ax-custom-lookup-in-dialog.html
Hm, why did you comment out //dataContract = this.getDataContractObject(); ?
You need data contract. Then you need to check that dlgFieldToBeOverridden is not null before calling any method on it.
Actually I want the lookup on the dialog is from the table CustTrans.
What all changes I have to do to get that. Can you please tell me.
Hi Siddhant,
As Ievgen said, don't comment contract class object.
1. create lookup method, you might need to use group by for accountNum display
looks like below code//use custTrans table, group by on AccountNum
public void lookupCustGroup(FormStringControl _formStringControl)
{
Query query = new Query();
QueryBuildDataSource DS;
SysTableLookup sysTablelookup;
//create a table lookup
sysTablelookup = SysTableLookup::newParameters(tableNum(CustGroup),_formStringControl);
sysTablelookup.addLookupfield(fieldNum(CustGroup,CustGroup));
//create a query
DS = query.addDataSource(tableNum(CustGroup));
//assign the query and call lookup
sysTablelookup.parmQuery(query);
sysTablelookup.performFormLookup();
}
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2