• Giovanni Di Santo
  • NEWBIE
  • 5 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
I developed a trigger firing after inserting records in the ContentDocumentLink object.
You can find the code here: http://nopaste.linux-dev.org/?780808.

The trigger works just fine but I have a problem with the testing class I wrote for it: http://nopaste.linux-dev.org/?780809

As you can see there is an insert for the object checked by the trigger.
When I run the test class I don't receive any error but the coverage is stuck at 0% no matter what I try to do. It seems like the trigger is not fired at all.

I suppose I'm making a mistake somewhere but I don't know where...

Can you guys guve me any hint?

Thanks,
Giovanni
I have Created a custom picklist field on opportunity with items(Stage-1, Stage-2, Stage-3, Stage-4), Included to page layout.

Now my requirement is Write a trigger on Opportunity to validate this Stage value with below conditions,

1. while record updating, Stage can be null/Previous Stage/Same Stage/Next stage(Stage-1 to Stage-2).
2. But stage value should not be skipped to Current Stage + 2 Stages.
I developed a trigger firing after inserting records in the ContentDocumentLink object.
You can find the code here: http://nopaste.linux-dev.org/?780808.

The trigger works just fine but I have a problem with the testing class I wrote for it: http://nopaste.linux-dev.org/?780809

As you can see there is an insert for the object checked by the trigger.
When I run the test class I don't receive any error but the coverage is stuck at 0% no matter what I try to do. It seems like the trigger is not fired at all.

I suppose I'm making a mistake somewhere but I don't know where...

Can you guys guve me any hint?

Thanks,
Giovanni