Announcements
Hi,
I tried to add employee name on the Enterprise Portal control custom lookup, because instead of adding display method, we need this employee name in the lookup filter.
I am getting the below error message when I try to add the multiple table on the lookup query. I tried with DirPerson and DirPartyTable. Any idea?
Message: An unhandled error has occurred. To view details about this error, enable debugging in the web.config file or view the Windows event logs.
Source: Microsoft.Dynamics.Framework.Portal
Exception details:
Lookup field was not found in the lookup data set
at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxLookup.ProcessSysDataSetLookup(SysDataSetLookup sysDataSetLookup)
at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxLookup.CallDataSetLookupMethod()
at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxLookup.LoadLookupDataSet()
at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxLookup.HandleLookup()
at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxLookup.RaisePostBackEvent(String eventArgument)
at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxLookup.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
void dataSetLookup(SysDataSetLookup sysDataSetLookup)
{
List list = new List(Types::String);
Query query;
QueryBuildDatasource qbdhcmworker, qbdsDirPartyTable;
query = new Query();
qbdhcmworker = query.addDataSource(tableNum(HcmWorker));
qbdsDirPartyTable = qbdhcmworker.addDataSource(tableNum(DirPartyTable));
qbdsDirPartyTable.relations(false);
qbdsDirPartyTable.joinMode(JoinMode::InnerJoin);
qbdsDirPartyTable.fields().dynamic(NoYes::Yes);
qbdsDirPartyTable.addLink(fieldNum(HcmWorker, Person), fieldNum(DirPartyTable, RecId));
list.addEnd(fieldStr(HcmWorker, PersonnelNumber));
list.addEnd(fieldStr(DirPartyTable, Name));
//list.addEnd(literalStr('name**'));
list.addEnd(fieldStr(HcmWorker,RecId));
sysDataSetLookup.parmLookupFields(list);
sysDataSetLookup.parmSelectField('RecId');
sysDataSetLookup.parmQuery(query);
}
Thanks,
Hari
I don't think sysDataSetLookup can work with a multi-table query (at least I haven't seen a working example). You can make a simple wiew and use it
André Arnaud de Cal...
294,190
Super User 2025 Season 1
Martin Dráb
232,968
Most Valuable Professional
nmaenpaa
101,158
Moderator