Quantcast
Channel: Iulian Cordobin's Groups Activities
Viewing all articles
Browse latest Browse all 1084

Error when jumping to last page on lookup grid in Enterprise Portal 2012

$
0
0

I've a problem with the "Last page button" on a lookup field in AX Enterprise Portal 2012:

when I press the button, an sharepoint error occurs and the event viewer shows this:

Multiple controls with different paging or sorting settings are bound to the same data member 'TrvCostType' of data source control 'LookupDataSource'. Disable paging and sorting in these bound controls or synchronize their paging and sorting settings.

Microsoft.Dynamics.Framework.Portal

   at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
   at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
   at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
   at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxBaseGridView.PerformSelect()
   at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
   at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxBaseGridView.AcceptPagingParameters(PagingSettings pagingParameters)
   at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxGridView.DataSourceViewPagingParametersChanged(Object sender, PagingChangedEventArgs e)
   at Microsoft.Dynamics.Framework.Portal.UI.WebControls.AxDataSourceView.OnPagingParametersChanged(PagingParametersChangedEventArgs e)
   at Microsoft.Dynamics.AX.Framework.Portal.Data.DataSetView.FormDataSource_PagingParametersChanged(Object sender, Object args)
   at Microsoft.Dynamics.AX.ManagedInterop.ClrBridgeImpl.ExecuteHandler(ClrBridgeImpl* , ObjectWrapper* pObjectWrapperHandler, ObjectWrapper* pObjectWrapperSender, ObjectWrapper* pObjectWrapperEventArgs)
   at AxEventDelegate.kcInvoke(AxEventDelegate* , interpret* ip)
   at cqlClass.callEx(cqlClass* , Char* , interpret* )
   at AxCore.AxRuntime.Call(AxRuntime* , IAxObject* axObject, String methodName, Type returnType, Object& result, Object[] paramList)
   at Microsoft.Dynamics.AX.ManagedInterop.Object.CallWithReturnType(String methodName, Type returnType, Object[] paramList)
   at Microsoft.Dynamics.Framework.BusinessConnector.Session.DynamicsObjectAdapter.Call(String methodName)


I've this AxBoundfield inside a AxGridView:

<Columns>
    <dynamics:AxBoundField DataField="CategoryId" DataSet="EPTrvExpParm" DataSetView="TrvExpParm_favCategory" SortExpression="CategoryId">
    </dynamics:AxBoundField>
    <dynamics:AxBoundField DataField="CategoryName" DataSet="EPTrvExpParm" DataSetView="TrvExpParm_favCategory" ReadOnly="True" SortExpression="CategoryName">
</dynamics:AxBoundField> </Columns>

The dataSetlookup method on the datafield CategoryId has been overridden and looks like this:

void dataSetLookup(SysDataSetLookup sysDataSetLookup)
{
    List                        list = new List(Types::String);
    Query                       query = new Query();
    QueryBuildRange             qbr;
    QueryBuildDataSource        qbds;

    // Add the table to the query.
    //query.addDataSource(tableNum(TrvCostType));
    qbds = query.addDataSource(tablenum(TrvCostType));

    qbr = qbds.addRange(fieldnum(TrvCostType, IsInActive));
    qbr.value(queryValue(NoYes::No));

    qbr.status(RangeStatus::Locked);

    // Specify the fields to use for the lookup.
    list.addEnd(fieldStr(TrvCostType,CostType));
    list.addEnd(fieldStr(TrvCostType,CostTxt));

    // Supply the set of lookup fields.
    sysDataSetLookup.parmLookupFields(list);

    // Specify the field that is returned from the lookup.
    sysDataSetLookup.parmSelectField('CostType');

    // Pass the query to the SysDataSetLookup so that the query is used.
    sysDataSetLookup.parmQuery(query);

}


If I press those little three dots and go to the last page "manually" then there is not problem or jumping to other pages.

I've multiple enviroments going on here. My development server doesn't have this problem. Out test server doesn't have this problem. Our customers test server doesn't have this problem, but our customers production server have this problem.

I've also tried to forge the lookup to use paging and sorting by adding these lines of code:

    qbds.addSortField(fieldnum(TrvCostType, CostType));
    sysDataSetLookup.parmAllowPaging(true);


But that didn't help.

Any suggestion would be appreciated.


Viewing all articles
Browse latest Browse all 1084

Trending Articles



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