When trying to add fill a grid and using a whereClause that is referencing another table:
private void refreshUnassignedAllergensGridData()
{System.Collections.Hashtable whereClauses = new System.Collections.Hashtable(1);
/*
if (this.Part_Row.dataView.Count>0)
whereClauses.Add(“AttrBin”, " Inactive = 0 and AttrCode not in (select Key2 from EpicorTest10.Ice.UD05 where UD05.Company = ‘ANH’ and UD05.Key1 = ‘“+this.Part_Row.dataView[0][“PartNum”].ToString()+”’)“);
else
whereClauses.Add(“AttrBin”, “2=1”);
*/
whereClauses.Add(“AttrBin”, " Inactive = 0 and AttrCode not in (select Key2 from Ice.UD05 where UD05.Company = ‘ANH’ and UD05.Key1 = ‘132’)”);SearchOptions searchOptions = SearchOptions.CreateRuntimeSearch(whereClauses, DataSetMode.RowsDataSet); this._abaUnassignedAllergens.InvokeSearch(searchOptions); if ((this._abaUnassignedAllergens.AttrBinData.AttrBin.Rows.Count > 0)) this._edvUnassignedAllergens.Row = 0; else this._edvUnassignedAllergens.Row = -1; MessageBox.Show("About to refresh"); this.gridUnassignedAllergens.Refresh();
}
I’m getting the following error:
Application Error Exception caught in: mscorlib Error Detail ============ Message: Exception has been thrown by the target of an invocation. Inner Exception Message: A server error occurred. Review the server event logs for details. Program: CommonLanguageRuntimeLibrary Method: InvokeMethod Client Stack Trace ================== at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Ice.Lib.Customization.CustomScriptMethodInvoker.InvokeScriptMethod(MethodInfo scriptMethod, Object[] parameters) at Ice.Lib.Customization.CustomScriptMethodInvoker.InvokeInitializeCustomCodeIfExists() at Ice.Lib.Customization.CustomScriptManager.TryActionShowExceptionBoxOrLogVerificationErrorIfException(Action action, String exceptionBoxTitle) Inner Exception =============== A server error occurred. Review the server event logs for details. at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets) at Erp.Proxy.BO.AttrBinImpl.GetRows(String whereClauseAttrBin, String whereClauseAttrBinAttch, Int32 pageSize, Int32 absolutePage, Boolean& morePages) at Erp.Adapters.AttrBinAdapter.OnGetRows(SearchOptions opts, Boolean& MorePages, String[] whereClauses) at Ice.Lib.Framework.EpiBaseAdapter.GetRows(SearchOptions opts, Boolean& morePages) at Ice.Lib.Searches.EpiSearchEngine.GetSearchResultsFromAdapterMethod(SearchOptions opts, SearchDataSetMode sdsMode) at Ice.Lib.Searches.EpiSearchEngine.SearchUsingAdapterMethod(SearchOptions options) at Ice.Lib.Searches.EpiSearchEngine.SearchIt(SearchOptions options, DataSet& results, Boolean& usedAdapter) at Ice.Lib.Searches.EpiSearchEngine.SearchIt(SearchOptions options) at Ice.Lib.Framework.EpiBaseAdapter.InvokeSearch(SearchOptions opts) at Script.refreshUnassignedAllergensGridData() at Script.InitializeUnassignedAllergensAdapter() at Script.InitializeCustomCode()
I’m pretty sure this used to work in a previous version. Is this new additional security?
Also, what’s the best way now to filter the results based on another table?