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
Mik Pellicci 7Mik Pellicci 7 

Salesforce Security Specialist Super badge Step 2

Hi All
Please can you help resolve this issue I am having with Step 2 of the Security Specialist Badge.
Having got to step 2 but cannot get any response other than this after running the Apex test: "Error MessageSystem.QueryException: List has no rows for assignment to SObject" this is not telling me anything just that it hs passed 0/2. I have configuresd the following:
I have tried loging in for each profile and it all seems to work ok including the the Project manager (add Samantha to the group to test)
OWD 
Account Public read/Write (Was Public read only) Opportunity (Private) Contacts Default (Controlled by Parent)
User
Samantha Cordero Filed Sales User (profile) Field Sales Role.
Profiles and Roles:
Field Sales User Profile  Account (RE) Opportunity (RCE)
 Field Sales Role (Users in this role cannot access opportunities that they do not own that are associated with accounts that they do own)
Inside Sales User Profile Account(RCE) Opportunities (RCE)
Inside Sales Role (Users in this role can edit all opportunities associated with accounts that they own, regardless of who owns the opportunities)
Executive Sales User Profile (Account R VA) Opportunity (R VA)
Executive Sales Role(Users in this role can view all opportunities associated with accounts that they own, regardless of who owns the opportunities)

Group
Project Managers
(Criteria based sharing rule below)

Sharing Rules
User-added imageUser-added image


Thanks in advance for any assistance that can be given 
Suley KaboreSuley Kabore
Hi Mik,
Here is a link that could help solve the error you are getting. I see that the sharing rule that you set between the 'field sales users' and 'All Internal users' is one of the sources of the error. Check the link, and if it does not solve your problem, let me know.
Have a good one.

https://developer.salesforce.com/forums/?id=906F0000000kEGAIA2
Mik Pellicci 10Mik Pellicci 10
Hi Suley Thank you for the reply I have tried this and no matter what I try I only get the the following:
System.QueryException: List has no rows for assignment to SObject


User-added image
Mik Pellicci 7Mik Pellicci 7
Hi Suley Thank you for the reply I have tried this and no matter what I try I only get the the following: "System.QueryException: List has no rows for assignment to SObject" This is not clear as to what is wrong. Best Wishes. Mik Pellicci Email: buzzmik@outlook.com Linkedin: http://uk.linkedin.com/pub/mik-pellicci/11/180/a26 Sent from Outlook
Suley KaboreSuley Kabore
Hi Mik,
 Here is what I passed the challenge with. If what you did differs from these screenshots, try it that way and let me know. When you check the challenge, open your developer console and go to test to see the result of the challenge. You should see a more meaningful error message that coud be helpful.

Sharing

The Public groups:
Groups
 
Suley KaboreSuley Kabore
And one more thing: There should not be any sharing rule applied the the Account object.
Mik Pellicci 10Mik Pellicci 10
Thanks Suley for your time I have Sharing Rules on the Account so will go back and reconfigure will let you know. BW Mik
Mik Pellicci 7Mik Pellicci 7
Hi all Still cannot get passed the error 'System.QueryException: List has no rows for assignment to SObject'
System.QueryException: List has no rows for assignment to SObject
can anyone please point me in the correct direction.

Thanks :)
Suley KaboreSuley Kabore
Hi Mik,
To be able to tell where you did wrong, you need to post a screenshot of what you did up to now, and I will gladly take a look to see what is the problem. Take care.
Mik Pellicci 7Mik Pellicci 7
Hi Suley I only study Trailhead on a Thursday so will check all the settings from the start and post on the feed thanks again Best Wishes. Mik Pellicci Email: buzzmik@outlook.com Linkedin: http://uk.linkedin.com/pub/mik-pellicci/11/180/a26 Sent from Outlook
Suley KaboreSuley Kabore
Hi Mik, No problem. I will take a look at it when you get the chance to do it. Have a good one.  Sent from Yahoo Mail on Android