Issue running PO Form

We are running into an issue when running the PO form, it seems to run fine in one of the Environments but in the Pilot Environment which is what i am getting people to do testing it comes up with the following error -

Program Ice.Services.Lib.RunTask when executing task 162 raised an unexpected exception with the following message: RunTask:
System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details.
—> System.Data.SqlClient.SqlException (0x80131904): Invalid column name ‘CertExpDate_c’.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func3 operation, TInterceptionContext interceptionContext, Action3 executing, Action3 executed)
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
ClientConnectionId:9b3d548c-cb32-49fb-8ee6-2606340535e6
Error Number:207,State:1,Class:16
— End of inner exception stack trace —
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) at System.Data.Entity.Core.Objects.ObjectQuery1.<>c__DisplayClass41_0.b__0()
at System.Data.Entity.Core.Objects.ObjectQuery1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__31_0() at System.Data.Entity.Internal.LazyEnumerator1.MoveNext()
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable1 source, Boolean& found) at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source)
at System.Data.Entity.Core.Objects.CompiledQuery.ExecuteQuery[TResult](ObjectContext context, Object[] parameterValues)
at Epicor.Data.DBExpressionCompiler.GetResult[TDataContext,TQuery,TResult](Func3 executeQuery, Cache cacheSetting, TDataContext dataContext, TQuery query) in C:\_releases\ICE\ICE4.2.200.0\Source\Server\Framework\Epicor.System\Data\DBExpressionCompiler.cs:line 446 at Epicor.Data.DBExpressionCompiler.InvokeSingle[TDataContext,TQuery,TResult](Expression expression, Cache currentCacheSetting, Boolean cacheQuery, TDataContext dataContext, Func2 getDataCacheKey, Func2 compileQuery, Func3 executeQuery) in C:_releases\ICE\ICE4.2.200.0\Source\Server\Framework\Epicor.System\Data\DBExpressionCompiler.cs:line 307
at Epicor.Data.DBExpressionCompiler.<>c__DisplayClass56_0`4.b__0(TContext context, TArg1 arg1, TArg2 arg2) in C:_releases\ICE\ICE4.2.200.0\Source\Server\Framework\Epicor.System\Data\DBExpressionCompiler.Generated.cs:line 0
at Erp.Tables.Vendor.FindFirstByPrimaryKey(ErpContext dataContext, String Company, Int32 VendorNum) in C:_releases\ERP\ERP11.2.200.0\Source\Server\Db\Erp.Data.910100\ErpContext.Model.cs:line 2014152
at Erp.Internal.PM.POForm.validateVendorAndSetRptLanguage(Int32 vendorNum, String purPoint) in C:_releases\ERP\ERP11.2.200.8\Source\Server\Internal\PM\POForm\POForm.cs:line 901
at Erp.Internal.PM.POForm.RunProcess(Int64 instanceTaskNum, String outputFileName) in C:_releases\ERP\ERP11.2.200.8\Source\Server\Internal\PM\POForm\POForm.cs:line 348
at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in C:_releases\ICE\ICE4.2.200.8\Source\Server\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 68
at Ice.Hosting.TaskCaller.ExecuteTask() in C:_releases\ICE\ICE4.2.200.8\Source\Server\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 64
at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in C:_releases\ICE\ICE4.2.200.0\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 63
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:_releases\ICE\ICE4.2.200.0\Source\Server\Services\Lib\RunTask\RunTask.cs:line 450

We can see in line 3 it is calling for a UD field which it says is invalid, but why would it be calling that field if it is the OOB report?

You can get that is the database and the data model are out of sync.

I usually see that when we create a new UD column in Live, and then sometime later copy the Live db to the Test environment. The test system will then throw error. To fix it U rebuild the data model (in the admin console).

HI Brett, i have done that already, when i copied the environment over to Pilot, that was part of the process when copied.

So pilot has the UD column but you are not expecting the report to be using it?

Pilot doesnt have the UD Column, nor does the environment that the report works in.

Your probably already on to this and I am not sure what your reporting setup is like but can you compare the report data definitions between the environments? Maybe the UD column sneaked its way into the report somehow?

Thats what i am looking at currrently, still not sure how a UD field would appear in an OOB report though?