InvcHead not found error

When I create AR invoices, sometimes I get a error message: “InvcHead not found”
Business Layer Exception

InvcHead not found.

Exception caught in: Epicor.ServiceModel

Error Detail

Correlation ID: 4fcb66c8-4029-44bd-9ea8-803293266e1e
Description: InvcHead not found.
Program: Erp.Services.BO.ARInvoice.dll
Method: OnChangeofInvDateEx
Line Number: 21887
Column Number: 17
Table: ttInvcHead
Field: RowMod

Client Stack Trace

at Epicor.ServiceModel.Channels.ImplBase1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets) at Erp.Proxy.BO.ARInvoiceImpl.OnChangeofInvDateEx(Int32 InvoiceNum, Nullable1 NewInvoiceDate, String recalcamts, String& cMessageText, ARInvoiceDataSet ds)
at Erp.Adapters.ARInvoiceAdapter.OnChangeofInvDateEx(Int32 invoiceNum, Nullable`1 newInvoiceDate, String recalcamts, String& cMessageText)

When I ask our intermediate, they do not know what causes the error. They only thing I could found out is that the error message occurs when there are more or around 10 lines.
Does anyone else had this error, and what can I doe about it?
Our Epicor version is 10.2.500.15.

Do you have any BPMs or Customizations?
The error happens because the server could not find an InvcHead record with RowMod A(new) or U(modified) to work with.

As far as I can see this should be working.

Enable client tracing and select the option to log the full dataset. When the error happens take a look at the trace and check the RowMod value when calling OnChangeofInvDateEx

I’ve also seen something recently when a bad UD field got added. Job records were getting added to the DB without and associated record in the UD table. If you have any InvcHead ud fields, the row count of InvcHead and InvcHead_UD should match.

Thanks all, I will forward your replies for further investigation. And hoping that the problem will be resolved.