function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lisa HorneLisa Horne 

Getting error on Test Class

I have the following trigger  and I am getting this error on the Test Class.  Could someone point out what I am doing wrong on the test class?

API Name
Type
Line
Column
Problem
TestCreateTaskOnInsertWebToLead.TestCreateTaskOnInsertWebToLead() Class 35 1 Failure Message: "System.DmlException: Insert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: []", Failure Stack Trace: "Class.TestCreateTaskOnInsertWebToLead.TestCreateTaskOnInsertWebToLead: line 35, column 1"

Trigger
User-added image

Class
User-added image
Best Answer chosen by Lisa Horne
Stephan SpiegelStephan Spiegel
If you look at the comment in your test class, there's a little hint for you:

"Change 005o0000000UsQX to your UserId"

All Answers

Stephan SpiegelStephan Spiegel
If you look at the comment in your test class, there's a little hint for you:

"Change 005o0000000UsQX to your UserId"
This was selected as the best answer
Lisa HorneLisa Horne
Doh!  must have been looking at it way to long.  Thanks!