I have seen the The multi-part identifier could not be bound error before, but this time it is giving it on my custom field which is simply a string.
When I run this with the VS2022 debugger running, the error is not caught, so I am not sure where it is even happening in my code. This is the workflow:
- create an Opportunity.
- From opportunity, create a “Project Quote”
- Convert Project Quote to Project:
- Add a row on the revenue budget tab for the project:
And, when I go to save I get the error message (note the error is in the CROpportunity for some reason:)
UsrAuthorizedByContact does exist in the SQL Database, and it does have value:
This is the stack trace of the error:
System.Data.SqlClient.SqlException (0x80131904): The multi-part identifier "CROpportunity.UsrAuthorizedByContact" could not be bound.
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.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.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at PX.Data.PXDatabaseProviderBase.ExecuteNonQuery(IDbCommand command)
at PX.Data.PXDatabaseProviderBase.updateCommon(IDbCommand cmd, String tableName, Int32 cid, PXDataFieldParam[] pars, AuditTable audit, Boolean isVisibilityUpdate, Boolean sharedDelete, companySetting setting)
at PX.Data.PXDatabaseProviderBase.<>c__DisplayClass155_0.<update>b__1(String tn, IDbCommand cmd)
at PX.Data.PXDatabaseProviderBase.usingDbCommand[T](Func`3 fnUsefulActions, String commandText, String tableName)
ClientConnectionId:3a2a8162-df10-4bab-8ec1-44766ab90758
Error Number:4104,State:1,Class:16
at PX.Data.PXDatabaseProviderBase.usingDbCommand[T](Func`3 fnUsefulActions, String commandText, String tableName)
at PX.Data.PXDatabaseProviderBase.Update(Type table, PXDataFieldParam[] pars)
at PX.Data.PXCache`1.PersistUpdated(Object row, Boolean bypassInterceptor)
at PX.Data.PXCache`1.Persist(PXDBOperation operation)
at PX.Data.PXGraph.Persist()
at PX.Objects.PM.ProjectEntry.Persist()
at PX.Data.PXSave`1.<HandlerInternal>g__Persist|3_2()
at PX.Data.PXSave`1.<HandlerInternal>d__3.MoveNext()
at PX.Data.PXAction`1.<Press>d__38.MoveNext()
at PX.Data.PXAction`1.<Press>d__38.MoveNext()
at PX.Web.UI.PXBaseDataSource.tryExecutePendingCommand(String viewName, String[] sortcolumns, Boolean[] descendings, Object[] searches, Object[] parameters, PXFilterRow[] filters, DataSourceSelectArguments arguments, Boolean& closeWindowRequired, Int32& adapterStartRow, Int32& adapterTotalRows)
at PX.Web.UI.PXBaseDataSource.ExecuteSelect(String viewName, DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments)
It is worth mentioning that in order to carry the values over from the Opportunity I had to override the dialog box. And I suspect this is where the culprit actually lies. I posted my full class here:
My question is two fold:
- How do you debug an error, when Acumatica is (apparently) catching and releasing it before the VS2022 Debugger gets to see it?
- What do I do to resolve this error?
TIA!
Best answer by mjgrice32
View original