You need to sign in to do that
Don't have an account?
![Amita Tatar Amita Tatar](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
how do i cover following test class ..please help
Hi Guys,
I have below test class and i am not able to cover the part after OLI id field as it is coming blank.
Its a formula field haveing opportunitylineitem.id as formula in it.
![User-added image](/forums/servlet/rtaImage?eid=9060G0000005POx&feoid=Body&refid=0EM0G00000039c9)
Regards,
Amita Tatar
I have below test class and i am not able to cover the part after OLI id field as it is coming blank.
Its a formula field haveing opportunitylineitem.id as formula in it.
Regards,
Amita Tatar
Here is the trick, you can try:
1 - Make a DML on that test data in test class, so the formula gets evaluated during test run and then query of that particular field and try
or
2 - In the trigger: instead of using the formula in your code, query for the referencial field, like q.quote.opportunityid.
or
3 - Worst of all, move it from formula to a text field and populate that using text