web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

EP custom lookup with multiple table fields

(0) ShareShare
ReportReport
Posted on by 36

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 have the same question (0)
  • Suggested answer
    ergun sahin Profile Picture
    8,826 Moderator on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 657

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 615 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 356

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans