Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

EP custom lookup with multiple table fields

$
0
0

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


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>