Reply
Contributor
Filifeno
Posts: 5
0
Accepted Solution

Test code on trigger

Hello I have a  trigger in my sandbox that moves a date from a task to an account, very simple. I wrote the test code and I have a code coverage of 100%.

When I try to move it to production, I get an error regarding another trigger (on opportunity object) that isn't linked to mine in any way. 

 

Is the system running all the tests when I try to upload anything?

Is there a way I can bypass this sort of error?

Super Contributor
sfdcfox
Posts: 3,912
0

Re: Test code on trigger

Is the system running all the tests when I try to upload anything?

 

Yes. This is noted in the Migration Toolkit documentation regarding deployment ("Run All Tests is always performed when deploying to a production environment.").

 

Is there a way I can bypass this sort of error?

 

Fix the trigger so it is no longer conflicting with the other. Or modify the other so it doesn't conflict with the one you're trying to upload, if possible. You can't just flip a switch and have it bypass; this might break business logic such that your system would become unusable for your users.

~ sfdcfox ~


I am a sandwich. That is all.

Regular Contributor
Moggy
Posts: 27
0

Re: Test code on trigger

I get an error regarding another trigger (on opportunity object)

 

What error message?

Not everything that counts can be counted,
and not everything that can be counted counts.
@Albert Einstein
Contributor
Filifeno
Posts: 5
0

Re: Test code on trigger

I fixed the test code of that other trigger.

 

It was very hard since I didn't wrote that code, but now everything works.

 

thanks a lot

 

@Moggy, the error was due to a field that had become mandatory and wasn't filled in the test code for the creation of an object.