I want to use the custom values for lookup, not want to make the table. How can I achieve this through Coding? I have tried the following code but it's quite old and not working in D365. Actually, there is no method such as SysLookup::lookupList().
public void lookup()
{
Counter yearCount;
List valueList = new List(Types::String);
for (yearCount = 0; yearCount < 5; yearCount++)
{
valueList.addEnd(strFmt("Year %1", year(SystemDateGet()) - yearCount));
}
SysLookup::lookupList(this, valueList, "List of years");
}
*This post is locked for comments