Method NamehugYourMother
Pass/FailFail
Error MessageSystem.QueryException: List has no rows for assignment to SObject
Stack TraceClass.sb_security.BeAwesome.createUser: line 89, column 1
Class.sb_security.BeAwesome.setup: line 81, column 1I have created the records owned by Samantha as mentioned and also created sharing rule for Project managers.Can someone please help ?
28 answers
I was able to clear this stage with the following steps (and, I am sure most of these steps you all are following):1. OWD settings for Opportunity object is 'Private'2. Created public group as 'Project Managers' for Project Manager related requirements.3. Setup Profiles and Roles for Field Sales User, Inside Sales User, and Sales Executive User4. Created one criteria based sharing rules for Opportunity:Criteria: (Opportunity: TypeEQUALSExisting Customer - Upgrade) AND (Opportunity: StageEQUALSClosed Won)Shared with: Group: Project ManagersAccess level: Read Only5. Then, created another sharing rule for Opportunity (this one I created only after unsuccessful run of the test cases). This sharing rule is owner based, with the following details: Criteria: Owner in All Internal Users
Shared with: Role: Inside Sales
Access level: Read/WriteThese steps should be enough to complete the stage-2.
Hello all,I am having issues downloading the trailhead security superbadge managed package on a new playground. Everytime I click the link it wants me to login and takes me to my main playground. I have everything taken care of for step 2 but obviously the apex tests wont run since i dont have the package installed. Please help me so i can finally finish this I figured out why my apex test only passed 1/2 of the test. Once I gave the inside sales user the View All permission for opportunities I immediatley passed both apex test and completed challenge 2 I was getting similar errors. This is how I resolved it.1: Created a public group "Project Managers"2: Added "Carla Rodriguez" to the "Project Managers" group3: Created the following two opportunity Sharing Rules (image attached)First Rule Name = Project ManagementCriteria(Opportunity: Type = Existing Customer - Upgrade) AND (Opportunity: Stage=Closed Won)Share withGroup: Project ManagersOpportunity Access Read Only
Second Rule Name =
Share with inside salesCriteriaOwner in Role: Field SalesRole:Share withInside SalesOpportunity AccessRead/Write
Note: Make sure OWD for opportunity is set as "Private
keep getting this error Security Specialist 2nd challenge
1) 3 profiles created
- Inside Sales User
- Sales Executive User
- Field Sales users
2) 3 Roles Created
- Sales Executive reporting to CEO
- Field Sales reporting to Sales Executive
- Inside Sales reporting to Sales Executive
3) 2 sharing Rules created
Field Sales user Samantha Created 2 opportunity
and after running the Apex Test Execution it does not pass Please HELPhi, i am doing Security Specialist 2nd challange and i got an error in apex test execution can anyone please rectify my errorerror message :-System.AssertException: 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 The answer of MaxWorld helped me to pass one test method. It is important to create an opportunity sharing rule that has the following:Rule type: Based on record ownerOpportunity owned by members of Public Groups | All internal usersShare with: Role Inside Sales Opportunity access: Access Read/WriteBefore I created that sharing rule I was facing the the following error (This is because you might have an opportunity sharing rule that share from field sales to inside sales; i.e: role to role).So I deleted that and created a new one as the user Maxworld suggestsAlso, NOTE that you must have the three roles created, I was missing the Sales Executive role, then run the test and the other test method passed.Stay purposeful! I was also facing the issue to pass this challenge due to test class failed , in my case it was the spelling error of role Sales Executive , i wrote it Sales Executives and after correction it worked for me. Please make sure about the spellings before passing this challenge. I hope it would help.Thanks and Regards,Pratiksha Chauhan