You need to sign in to do that
Don't have an account?
Sudipta Deb
Issue with Unit Test having test data > 200
Hi All -
I am getting the below error when I am testing the my block of code(Trigger helper method) with test data > 200. Any amount of test data which is < 200, my block of code is working fine. Do you have any idea or anybody faced the similar issue earlier
I am getting the below error when I am testing the my block of code(Trigger helper method) with test data > 200. Any amount of test data which is < 200, my block of code is working fine. Do you have any idea or anybody faced the similar issue earlier
System.DmlException: Update failed. First exception on row 200 with id 50036000003SZd8AAG; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, MaintenanceRequest: execution of AfterUpdate caused by: System.DmlException: Insert failed. First exception on row 0 with id 50036000003SZd9AAG; first error: INVALID_FIELD_FOR_INSERT_UPDATE, cannot specify Id in an insert call: [Id] Class.MaintenanceRequestHelper.createFollowUpMaintenanceRequest: line 52, column 1 Class.MaintenanceRequestHelper.updateAfterUpdateActivity: line 15, column 1 Trigger.MaintenanceRequest: line 3, column 1: []
Reason for this issue is you are inserting a record having ID != null. So it is giving exception. While inserting record, record Id should be blanck.
Please cross check the code and let me know if any help.
Thanks,
Vedashri
I am not specifying any ID value in the new record. But still getting this error. That is why I am little confused here.
Please try below code: