Skip to content

Instantly share code, notes, and snippets.

@ztirom

ztirom/lookup Secret

Last active Apr 22, 2016
Embed
What would you like to do?
AX2012 Custom Lookup on a Dialog
public void lookup(FormStringControl _control)
{
Query query = new Query();
QueryBuildDataSource queryBuildDataSource;
SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(AifAdapter),
_control);
// Create lookup for AifAdapter's Name and AdapterClassId
sysTableLookup.addLookupField(fieldNum(AifAdapter, Name));
sysTableLookup.addLookupField(fieldNum(AifAdapter, AdapterClassId));
// Setup query
queryBuildDataSource = query.addDataSource(tableNum(AifAdapter));
sysTableLookup.parmQuery(query);
// Perform lookup
sysTableLookup.performFormLookup();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment