+ Start a Discussion
Kathryn BullockKathryn Bullock 

Test Class uploaded to Production, but the Trigger won't?

I have a test class that uploaded to production with no problem.  Now I am unable to upload the trigger becuase of a problem on the test class???

Here is the error message:

System.StringException: Invalid id: Tacoma WA 
Stack Trace: Class.TestleadDuplicatePreventer.TestleadDuplicatePreventerwithOneOpp: line 39, column 1

But that is the test class.  Any and all help is appreciated!!

Raj VakatiRaj Vakati
While uploading the trigger , looks like your dependent class that are used in trigger is not Synced with Production code 

Upload trigger and all the class that are referred in trigger 
Sampath SuranjiSampath Suranji
It looks like you are assigning a invalied id. most probably that would be a lookup field.
before moving test classes to production test them in sandbox and make sure it is passing all methods without errors.