• Kumar P246
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hello,

I am stuck on superbadge challenge #2. Origianlly the error i kept receiving said that my opportunity sharing rules were not correct, and now that I've gotten those correct I still cannot pass the challenge.
Heres the error I cant seem to get pass on trailhead:

Challenge Not yet complete... here's what's wrong: 
The unit tests in the managed package have not passed successfully. Make sure you run all test in your org before checking this section. Ensure that they all pass.

On the developer console I get this error message:
System.QueryException: List has no rows for assignment to SObject


How do I troubleshot this? or what am I doing wrong? 

1. opportunities are set to private
2. public group has been created (project managers) carla rodriguiz 
3. sharing rules are correct and match that of others who have passed
4. two opportunity records are created for samantha, one with stage closed won, next with type existing customer-upgrade
5. I am using a newly created org, and have uninstalled and reinstalled the package multiple times
6. I even logged in as samantha and created the two opportunities

What do I need to do for the test to pass sucessfully? 
Hey All, 

First time posting here, I look forward to what I can learn from the community.  I am a mostly self taught Admin so I suspect my issue stems from some of the common knoweldge gaps that newer self taught types can have.  I've read post after post and watched countless videos and can't figure out the small little thing that is hanging me up on this. I also see that this doesn't seem to have spell check so all you grammer hounds please grant me mercy. 

First, since language changes on these modules I'll post the step for future readers and then the error I'm getting. 
---
2)
Set record-level security settings
Configure other Salesforce settings related to record-level security to meet the business requirements.
Create a user, Samantha Cordero, and assign her the Field Sales User profile and the Field Sales role
Create an opportunity owned by Samantha with the stage name 'Needs Analysis'
Create a Closed Won opportunity owned by Samantha, with the type of 'Existing Customer - Upgrade'
---
The error on the apex test thing I get: "Assertion Failed: Field Sales users should not be able to read Opportunities owned by someone else. However, the test returned records not owned by the user. #sadtrombone: Expected: 1, Actual: 3"

So here are the few things I've drilled into and checked, I honestly can't think of anything else that I'm missing. Other parts of this could be messed up but as far as relation to the error thrown I just can't find it. 

1) Issue with the Profile, "Field Sales User". I don't think this is it due to the error throwing a lower case "user" which makes me think it's an issue with roles. Also this doesn't really have much to do with viewing rights beyond basic allowance so.. eh. Honestly I'm not even sure the best way to approach Profiles vs Roles, but again, noob here. In this profile I have the Opportunity object checked for everything except "delete" as the trail ask. 

User-added image

2) Roles. Now here is where we get to the good stuff. I've checked the hierchy and have tried to mark that lowly field reps are not worthy of viewing other's opportunities (humor y'all).  For your consideration here are shots of the hierchy and the field where I marked them as unworthy. 

User-added image 

User-added image

---
3) Sharing Settings. This is the last area I know of to deal with this error.  I have set Opportunities to private. This, in combination with the other rules really baffles me as to why field reps can still creep on other opportunities. For visual confirmation: 

User-added image

Any help or hints would be much appreciated on this.  In the event I make it out to Dreamforce and the lucky person that helps me out the most does I will gladly buy you a beer or coffee or heck even both! 

Cheers.