how to write lookup method

hi all,

i want to create a lookup method in forms… and i want the field to be in lookup form…how to write and where to write the code…can anyone help me plz?

hi Jasmine,

write the lookup method in Table Methods in which you are using as a data source for that form

i think this may help you

client static void lookupDeliveryAccount(FormStringControl ctrl,

CustInvoiceAccount invoiceAccount)


Args args;

Object formRun;


args = new Args();;

formRun = classfactory.formRunClass(args);






Thanks Suresh…i ll try and let you know…

and is that the name of the field we should add at the end…lookupDeliveryAccount()


Have you read about lookup method in Developers guide? There are lots of useful info there.

Hi Jasmine,

If you want to create a lookup form and if you want to get this form lookup for a field then you make that field as EDT and in the properties window set the FormHelp property to the form you created this is one way…


you can create a lookup at run time for that field in the form datasource override the lookup method

for that field and use the systablelookup class

systablelookup stl = systablelookup::newparameters(tablenum());



Hi Jasmine,

see this

we can write lookup method in datasource level–> field -->override lookup() Method

HI All,

Thank you so much your your valuable response…i ll surely work through it…

i have learnt in developers guide…but could not understand how to aplly practically…now i have got some idea…i ll try it out…

once again thanks to all who has replied…

yes i got the solution after going thro’ documents of lookups from dynamics AX cookbook once again…