You need to sign in to do that
Don't have an account?
Andrei Markautsou
Internal Salesforce Error 318931575-52897 (-131831505) (-131831505)
Since Winter 18 update I'm getting the Internal Salesforce Error (-131831505) while executing Unit tests. Seems error persists during tests only. It works okay in real-time. I was able to find out that code fails on Inserting the task with custom Record Type Id which is part of the package:
Task task = new Task(Subject = "Subject",
Description = "Description",
ActivityDate = Date.today(),
RecordTypeId = recordTypeId,
Status = 'Completed'
);
Task task = new Task(Subject = "Subject",
Description = "Description",
ActivityDate = Date.today(),
RecordTypeId = recordTypeId,
Status = 'Completed'
);
Try the following
disable triggers on the Task object or any other objects that this test affects
disable Process Builder processes on this object or any other objects that this test affects
If I create and test the following it works for me without error. My recordTypeId value will of course be different than yours.
Thank you for looking into this. Your reply helped to understand that the issue caused by different code. Please see below the test method which throws the error (Internal Salesforce Error: 639561078-67796 (-131831505) (-131831505)):
I still think this is happening during Unit test only. Anyway this is not critical, I just removed the Debug logging.
Thanks,
Andrei