You need to sign in to do that
Don't have an account?
ylandra
unit test for Opportunity from contact
I have a trigger that updates fields on the opportunity from contact fields when the opportunity is created from the contact. The problem I have discovered is that there seems to be no way to simulate this in a unit test.
Does anyone have any ideas about how to test this?
Does anyone have any ideas about how to test this?
You can write a test class which creates an Opportunity and then compare the fields values for the contact and Opportunity to see if the trigger has updated the opportunity field correctly.
Hoping I've understood your requirement correctly..
Does that make more sense?