• rohit rahul
  • NEWBIE
  • -1 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hi, I am trying to write test classes for code that accepts a Connect.Community object as an arguement and then uses that community to determine behavior (for example, looking up specific records).  The methods used to get communites on the ConnectApi requires SeeAllData=true, however, I want to be able to write my tests so that they can run in a data silo.

Is there a way I can abstract my call to get communities outside of the test context so that I don't have to run tests with SeeAllData enabled?
Hi Team,
I have a strange situation: I have an opportunity trigger like the one below:
 
trigger OppClosedTrigger on Opportunity (after update) {
    for (Opportunity opp : Trigger.New) {
        if (opp.IsClosed && opp.IsWon) {
            ProvisionBCAccount.provisionAccountForOpportunity(opp);       
        }
    }
}

and yesterday we were getting the following exception:
Error:Apex trigger OppClosedTrigger caused an unexpected exception, contact your administrator: OppClosedTrigger: execution of AfterUpdate caused by: System.QueryException: List has no rows for assignment to SObject: ()

I don't understand what this might due to? Are the Opty Triggers async? or is there something else happening? 

Thank you for your help.

GC

User-added image
While clicking on button called Visualforce page.

Hi,

I would lik to query all validation rules that contain a condition with profiles. Is this possible?

Thanks in advance!