You need to sign in to do that
Don't have an account?
Patrick Mulligan 3
security superbadge
Hi all, I have managed to get past the first challenge, and partly past the second challenge. The second Apex test keeps failiing and I just want to make sure there is not a bug in the class. The reason I ask is because:
1) The org wide defaults are set to private.
2) I removed all sharing rules as a test and I could still not get it to fire.
3) The list view for test opps for Samantha Cordero returns only her test opps with opps owned by the sys admin on original org setup.
4) I even mass transfered all the opps owned by the sysadmin (myself) to Samantha
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: 2
So, if I have no sharing rules, and the OWD is set to private for opps, how can this even happen? (I did pass the sharing rule setup earlier in the challenge, but I deleted them to test this).
Thanks
1) The org wide defaults are set to private.
2) I removed all sharing rules as a test and I could still not get it to fire.
3) The list view for test opps for Samantha Cordero returns only her test opps with opps owned by the sys admin on original org setup.
4) I even mass transfered all the opps owned by the sysadmin (myself) to Samantha
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: 2
So, if I have no sharing rules, and the OWD is set to private for opps, how can this even happen? (I did pass the sharing rule setup earlier in the challenge, but I deleted them to test this).
Thanks
May I request you to please double check with below steps in order to validate the challenge successfully.
- OWD settings for Opportunity object is 'Private'.
- Create public group as 'Project Managers' for Project Manager related requirements.
- Setup Profiles and Roles for Field Sales User, Inside Sales User, and Sales Executive User.
- Created one criteria-based sharing rule for Opportunity.Criteria: (Opportunity: TypeEQUALSExisting Customer - Upgrade) AND (Opportunity: StageEQUALSClosed Won)
- Then, create 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:
Mark this as solved if it's resolved.Shared with: Group: Project Managers
Access level: Read Only
Criteria: Owner in All Internal Users (you may also use Sales Executive role as the criteria instead of All internal users)
Shared with: Role: Inside Sales
Access level: Read/Write
Regards,
Nagendra.
My point is, the error message is saying: 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: 2"
This is what the requirement is, but even after I delete all sharing rules, and with the OWD set to private, I still get the same message!!! That should be impossible in this situation correct?!!! With not sharing rules, and the OWD set to private, should the message not be something to the opposite, somethink like "no sharing rules exist"? There shold be no opps available to read between field sales users at all given this scenario?
System.AssertException: Assertion Failed: Inside Sales users should be able to read all Opportunities but the test did not find all records. #sadtrombone: Expected: 3, Actual: 2