Table based custom lookup?

There is a standard table named SMARepairLine. When you choosed SymptomAreaId at this table, SymptomCodeId’s lookup shown as filtered by that selected SymptomAreaId. I can do it write custom lookups at form level.

I (assume) looked everywhere at SMARepairLine table and couldn’t find how it did by? They had created a relation for SymptomCode, I created and no success. The had created a method named webLookupSymptomCode, I created too, no success…

How can I do that at table level?

If you take a look at SMASymptomCodeId (EDT), you’ll see that FormHelp is set to SMASymptomCodeLookup. It means that SMASymptomCodeLookup form is what builds the lookup. And if you open its init() method, the answer why it doesn’t work for your custom table becomes obvious:

if (element.args().dataset() == tablenum(SMARepairLine))
{
    repairLine = element.args().record();

    symptomAreaId = repairLine.SymptomAreaId;
}

Thank you, it works perfect… [:)]