0
votes

I am getting error when trying to save Checks and Payments record.

The process is when I click on 'Pay Bill/Apply Adjustments' (AP301000) under 'Actions', I am redirected to the Checks and Payments (AP302000) screen. And when I try to save the record, I get the below stack trace.

Error: Inserting  'Payment' record raised at least one error. Please review the errors.

Error: 'Invoice Date' cannot be empty.

   at PX.Data.PXUIFieldAttribute.CommandPreparing(PXCache sender, PXCommandPreparingEventArgs e) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Attribute.cs:line 3684
   at PX.Data.PXCache.OnCommandPreparing(String name, Object row, Object value, PXDBOperation operation, Type table, FieldDescription& description) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Cache\ModelEventHandling.cs:line 146
   at PX.Data.PXTableAttribute.PrepareParametersForInsert(PXCache sender, Object row, Type[] tables, ISqlDialect dialect, Boolean audit, List`1[] pars) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Attributebase.cs:line 1123
   at PX.Data.PXTableAttribute.PersistInserted(PXCache sender, Object row) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Attributebase.cs:line 990
   at PX.Data.PXCache`1.PersistInserted(Object row, Boolean bypassInterceptor) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Cache\Model.cs:line 6550
   at PX.Data.PXCache`1.Persist(PXDBOperation operation) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Cache\Model.cs:line 6090
   at PX.Data.PXGraph.Persist(Type cacheType, PXDBOperation operation) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Graph\Graph.cs:line 4402
   at PX.Data.PXGraph.Persist() in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Graph\Graph.cs:line 4322
   at PX.Objects.AP.APPaymentEntry.Persist() in C:\Bld\AC-FULL2019R18-JOB1\Sources\WebSites\Pure\PX.Objects\AP\APPaymentEntry.cs:line 1468
   at PX.Data.PXSave`1.d__2.MoveNext() in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Action\CommonActions.cs:line 73
   at PX.Data.PXAction`1.d__32.MoveNext() in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Action\PXAction.cs:line 954
   at PX.Data.PXAction`1.d__32.MoveNext() in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Data\Descriptor\Action\PXAction.cs:line 896
   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) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Web.UI\Controls\Data\DataSource.cs:line 2592
   at PX.Web.UI.PXBaseDataSource.ExecuteSelect(String viewName, DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments) in C:\Bld\AC-FULL2019R18-JOB1\Sources\NetTools\PX.Web.UI\Controls\Data\DataSource.cs:line 1983

The coincidence is I have the customization that has a custom field the Display Text 'Invoice Date'. So, the first thing I did was I put the PersistingCheck to nothing in PXDefault attribute.

[PXDefault(PersistingCheck = PXPersistingCheck.Nothing)]

But that still didn't solve the problem. So, I unpublish the customization and the issue was still there. Then finally I even removed the custom field (NB: The field is nullable) from database to make sure that my customization isn't causing the issue. But that also didn't work.

Upon trying to find DAC fields with the particular display text I find some fields but that doesn't seem to be associated with the graph for those screens.

Thank you.

1
Do you have anything on Orders To Apply tab of the Payment screen?Dmitrii Naumov
Didn't see Invoice Date but I see Payment Date (docDate field) in Checks and Payments screen. imgur.com/kTiQGAmBikash Lama

1 Answers

1
votes

It looks strange, I don't see any related fields with "Invoice Date" display name, which may cause an issue. I faced similar strange issues due to IIS data caching.

I would recommend do the following:

  • Restart IIS
  • Remove temp ASP.NET files which are located somewhere here C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
  • Remove temp Customization files

Then to be sure the problem is not in your customization

  • Rename your custom field from "Invoice Date" to "Invoice Date 1" for example
  • Publish your customization again
  • Try your steps again and verify an error message if it still exists - which display name do you see, "Invoice Date" or "Invoice Date 1"?