Payments2Us ManualsPayments2Us - Frequently Asked QuestionsError Messages - FAQWhy do I get an Error like "Last Modified Date(Tue Jul 12 02:11:16 GMT 2022) before Create Date(Mon Aug 01 15:01:05 GMT 2022) for entity 01I2w000001qemN.: Last Modified Date, Field: LastModifiedDate"?

Why do I get an Error like "Last Modified Date(Tue Jul 12 02:11:16 GMT 2022) before Create Date(Mon Aug 01 15:01:05 GMT 2022) for entity 01I2w000001qemN.: Last Modified Date, Field: LastModifiedDate"?

The root cause of this error is when we copy like for like fields from a related object such as Contact to another object, for example Payment Txn, the system is copying the Last Modified Date, but is not copying the Created Date.
For most organisations, this SHOULD NEVER  happen as audit fields like CreatedDate, LastModifiedDate are read only.

Audit fields should only be set to editable during data migrations and then turn back off after that.

From the setup:

  1. Search "User Interface"
  2. Locate the "User Interface" Menu option (not the top level expandable menu option)
  3. Make sure "Enable "Set Audit Fields upon Record Creation" and "Update Records with Inactive Owners" User Permissions" is NOT selected
  4. SAVE

1. Disabling Audit fields

  1. From Setup, enter User in Quick Find box and select User Interface.
  2. De-select the checkbox to disable: Enable "Set Audit Fields upon Record Creation" and "Update Records with Inactive Owners" User Permissions
  3. Click Save

2. The Error Log has "Program/Area: recurringPaymentsProcessor.makePayment"

This validation stopped the recurring payment processor from running.  This error needs to be addressed today before the next Recurring Payment Run as the card hold may get charged again tomorrow as the system has no record of todays run happening.

From the Error Log, you need to copy the record details from and including the first "{" to and including the last "}"

Copy this to notepad or similar and paste.

Then remove the Last modified date, including the comma prior.  Delete as shown in the highlight example.

Before Delete:

After Delete:

Click on the setup cog > then Developer Console

Then select Debug > Open Execute Anonymous Window

Copy the code below and paste into the window

string j = '';
AAkPay__Payment_Txn__c p =  (AAkPay__Payment_Txn__c) json.deserialize(j,  SObject.class);
insert p;
Click to copy

Select and highlight the notepad copy of the record and paste that between the single quotes in the "string j ='';"

For example the below

Press the Execute button.

This will create a new Payment Txn record.  You should be able to see this under the Payment Txn Tab.

3. The Error Log has "Program/Area: paymentMatchingUtil.createContacts" or "Program/Area: paymentUtil.chargeCardAndUpdate"

The error log should be linked to the Payment Txn.  Click into the Payment Txn, then check the "Banked Payment" field.  If this has YES, then change the "Status" field to "Receipting Complete" and SAVE.