function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CTU007CTU007 

Urgent: Cloud Swarm: validation error apex trigger opptySwarm caused an unexpected exception

It happens when user rejects an opportunity approval request.

 

Screenshot:

 

This image is not available because: You don’t have the privileges to see it, or it has been removed from the system

ReidCReidC

This is a question of having too many SOQL queries as part of the trigger.  I'm guessing that you have a non-Chatter Swarm trigger operating as well and it is using some SOQL queries as part of this.  IIRC, ChatterSwarm is fairly optimized for queries but does still use several.  You might need to take a detailed look at the code to see which apps are using how many queries and adjust your code.

 

HTH.

CTU007CTU007

I run the test and this is the result:

 

Summary

 
Test ClassCaseSwarmTest
Tests Run6
Test Failures5
Code Coverage Total %42
Total Time (ms)113870.0
CTU007CTU007

I dont know how to troubleshoot this, maybe I will delete it.

ReidCReidC

Tests can fail for a few reasons.  Many times Apex tests fail b/c they create sample data which doesn't match the orgs validation rules.  This might be true here.  So, for example, if you require some field on your opportunity and have a custom validation rule configured, that can cause the Apex Test to fail.

 

You can actually create a log of your app which will tell you -- in great detail -- what is happening, what processes are using how many SOQL queries, etc.  Search Help under "system log" for details.

sf_ckempsf_ckemp

Make sure that you have feed tracking for Opportunities and Cases.  To do this, go to Setup | App Setup | Customize | Chatter | Feed Tracking and for Cases and Opportunities make sure to check "Enable Feed Tracking" and save.

 

cK