EpiCombo with UserCode

I have created some UserCodes of type Fault and now want to add an EpiCombo which is a drop-down of these fault types. I have replicated the settings from a working EpicCombo that I created in the past but just can’t get this one to work. I must be overlooking something simple but can’t see it. Can anyone help please?

This is the error that I see:

And this is the setup:

I don’t know if actually necessary, but I did do a database regen and restarted the app server just to rule that out as a possible cause.

Can you scroll to the top and post the whole error msg please?

Can you locate the error in the server app log?

Yes, if someone can tell me how to do that. I have not accessed apps server logs before and don’t know where they’re located.

On your main application server:

1 Like
Ice.Common.EpicorServerException: Incorrect syntax near '‘'. ---> System.Data.SqlClient.SqlException: Incorrect syntax near '‘'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TrySetMetaData(_SqlMetaDataSet metaData, Boolean moreInfo)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader()
   at Ice.TablesetBound`3.<>c__DisplayClass23_1.<InnerGetRows>b__0() in C:\_releases\ICE\ICE3.2.700.40\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 274
   at Ice.Services.Trace.TablesetProfilingCollector.DoStoredProcedureTrace[TResult](String storedProcedureName, Func`1 action) in C:\_releases\ICE\ICE3.2.700.40\Source\Framework\Epicor.Ice\Services\TablesetProfilingCollector.cs:line 164
   at Ice.TablesetBound`3.InnerGetRows(IceDataContext dataContext, Int32 pageSize, Int32 absolutePage, Boolean& morePages, TFullTableset tableset, IEnumerable`1 whereClauses) in C:\_releases\ICE\ICE3.2.700.40\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 194
   at Ice.Services.BO.UserCodesSvc.GetRows(String whereClauseUDCodeType, String whereClauseUDCodes, Int32 pageSize, Int32 absolutePage, Boolean& morePages) in C:\_Releases\ICE\ICE3.2.700.0\Source\Server\Services\BO\UserCodes\UserCodes.Designer.cs:line 693
   at Ice.Services.BO.UserCodesSvcFacade.GetRows(String whereClauseUDCodeType, String whereClauseUDCodes, Int32 pageSize, Int32 absolutePage, Boolean& morePages) in C:\_Releases\ICE\ICE3.2.700.0\Source\Server\Services\BO\UserCodes\UserCodesSvcFacade.cs:line 294
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Ice.Hosting.ServiceCaller.innerGet(MethodSpec plan, CallContext ctx, IceDataContext dataContext, Boolean isGenericOperation, String whereClause, Int32 pageSize) in C:\_releases\ICE\ICE3.2.700.40\Source\Framework\Epicor.Ice\Hosting\ServiceCaller\ServiceCaller.cs:line 610
   at Ice.Hosting.ServiceCaller.GetRows(IceDataContext dataContext, String boName, String whereClause, Int32 pageSize) in C:\_releases\ICE\ICE3.2.700.40\Source\Framework\Epicor.Ice\Hosting\ServiceCaller\ServiceCaller.cs:line 328
   at Ice.Services.Lib.BOReaderSvc.GetRowsWithPaging(String serviceNamespace, String whereClause, Int32 pageSize, String columnList) in C:\_Releases\ICE\ICE3.2.700.0\Source\Server\Services\Lib\BOReader\BOReader.cs:line 114
   at Ice.Services.Lib.BOReaderSvc.GetRows(String serviceNamespace, String whereClause, String columnList) in C:\_Releases\ICE\ICE3.2.700.0\Source\Server\Services\Lib\BOReader\BOReader.cs:line 98
   at Ice.Services.Lib.BOReaderSvcFacade.GetRows(String serviceNamespace, String whereClause, String columnList) in C:\_Releases\ICE\ICE3.2.700.0\Source\Server\Services\Lib\BOReader\BOReaderSvcFacade.cs:line 252
   at SyncInvokeGetRows(Object , Object[] , Object[] )
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
   at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func`2 func) in C:\_releases\ICE\ICE3.2.700.40\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
   at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func`2 func) in C:\_releases\ICE\ICE3.2.700.40\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28

1 Like

So the first line of that App Server error message piqued my interest. This is what ended up being the problem:

The EpiCombo Search Filter was set to:
CodeTypeID = ‘Fault’

but it needed to be this instead:
CodeTypeID = 'Fault'

VERY subtle and practically visually indistinguishable! But it works now.

3 Likes

Yep nice find! Hard to tell from that screenshot

1 Like