Lookup in form level
/// <summary>
/// Lookup for admin to select data projects of type import in DMF parameters form for users to use during quote import
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
[FormControlEventHandler(formControlStr(DMFParameters, KGSPP_DMFDefinitionGroup), FormControlEventType::Lookup)]
public static void KGSPP_DMFDefinitionGroup_OnLookup(FormControl sender, FormControlEventArgs e)
{
SysTableLookup tableLookup;
Query query = new Query();
tableLookup = SysTableLookup::newParameters(tableNum(DMFDefinitionGroup), sender);
tableLookup.addLookupfield(fieldNum(DMFDefinitionGroup, DefinitionGroupName), true);
tableLookup.addLookupfield(fieldNum(DMFDefinitionGroup, OperationType));
QueryBuildDataSource qbds = query.addDataSource(tableNum(DMFDefinitionGroup));
qbds.addRange(fieldNum(DMFDefinitionGroup, OperationType)).value(queryValue(DMFOperationType::Import));
tableLookup.parmQuery(query);
tableLookup.performFormLookup();
}
/// Lookup for admin to select data projects of type import in DMF parameters form for users to use during quote import
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
[FormControlEventHandler(formControlStr(DMFParameters, KGSPP_DMFDefinitionGroup), FormControlEventType::Lookup)]
public static void KGSPP_DMFDefinitionGroup_OnLookup(FormControl sender, FormControlEventArgs e)
{
SysTableLookup tableLookup;
Query query = new Query();
tableLookup = SysTableLookup::newParameters(tableNum(DMFDefinitionGroup), sender);
tableLookup.addLookupfield(fieldNum(DMFDefinitionGroup, DefinitionGroupName), true);
tableLookup.addLookupfield(fieldNum(DMFDefinitionGroup, OperationType));
QueryBuildDataSource qbds = query.addDataSource(tableNum(DMFDefinitionGroup));
qbds.addRange(fieldNum(DMFDefinitionGroup, OperationType)).value(queryValue(DMFOperationType::Import));
tableLookup.parmQuery(query);
tableLookup.performFormLookup();
}
Comments
Post a Comment