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
Daniel NagelDaniel Nagel 

Customize Your Community - Share CRM Data with Your Partners - Use Sharing Rules for External Users

Hi there, 

i am having a little trouble with lecture 5 of the "Customize Your Community - Share CRM Data with Your Partners" project. After creating all sharing rules as stated in the lecture, I can not verifiy the step. I receive the error message 

"Step not yet complete in My Trailhead Playground 16
There was an unexpected error in your org which is preventing this assessment check from completing: System.QueryException: List has no rows for assignment to SObject"

I double and tripple checked the whole configuration, but can not find any mistake and because the project is very tideous, I hope to avoid doing it all over again. Is there something, I can do or check to repair my org and finally pass this lecture?

Thanks in advance! 
Best Answer chosen by Daniel Nagel
NagendraNagendra (Salesforce Developers) 
Hi Nagel,

Sorry for this issue you are facing.

I faced a similar issue in the past where I missed one of the mains steps "Set Your Org's External Org-Wide Defaults". Just check you've done it correctly.

Still, if the problem persists It is most likely an org issue. It might possible that there is an existing customization (like Apex or an AppExchange app) that was interfering with the challenge.

I suggest you please use a new Developer Org / Trailhead Playground for validating the challenge. That has fixed a lot of problems for me in the past.

Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Nagel,

Sorry for this issue you are facing.

I faced a similar issue in the past where I missed one of the mains steps "Set Your Org's External Org-Wide Defaults". Just check you've done it correctly.

Still, if the problem persists It is most likely an org issue. It might possible that there is an existing customization (like Apex or an AppExchange app) that was interfering with the challenge.

I suggest you please use a new Developer Org / Trailhead Playground for validating the challenge. That has fixed a lot of problems for me in the past.

Hope this helps.

Kindly mark this as solved if the reply was helpful.

Thanks,
Nagendra
This was selected as the best answer
Daniel NagelDaniel Nagel
Hi Negendra, 
thank you for your feedback. I just checked the External Org-Wide Defaulfts for my org and they are correct. Just to make sure, that this is the case, I redid the configuration as well. But I still can not pass the challenge. 

So I think, I will just use another Org and try it again. I will post the results as soon as possible. 

Thank you, 

Daniel
 
Rajesh Yandrathi 1Rajesh Yandrathi 1
This worked for me:
1. Renamed the inactive Sean Forbes to XSean XForbes
2. Set Debug Logs - Checked the exception


15:22:32.19 (19949232)|EXECUTION_STARTED
15:22:32.19 (19975519)|CODE_UNIT_STARTED|[EXTERNAL]|execute_anonymous_apex
15:22:32.19 (20793033)|VARIABLE_SCOPE_BEGIN|[1]|contacts|List<Contact>|true|false
15:22:32.19 (20909079)|VARIABLE_SCOPE_BEGIN|[7]|opp|Opportunity|true|false
15:22:32.19 (20941265)|VARIABLE_SCOPE_BEGIN|[8]|ura|UserRecordAccess|true|false
15:22:32.19 (20982549)|VARIABLE_SCOPE_BEGIN|[3]|users|List<User>|true|false
15:22:32.19 (21007781)|VARIABLE_SCOPE_BEGIN|[5]|users2|List<User>|true|false
15:22:32.19 (21356112)|HEAP_ALLOCATE|[79]|Bytes:3
15:22:32.19 (21423505)|HEAP_ALLOCATE|[84]|Bytes:152
15:22:32.19 (21443154)|HEAP_ALLOCATE|[399]|Bytes:408
15:22:32.19 (21464462)|HEAP_ALLOCATE|[412]|Bytes:408
15:22:32.19 (21480065)|HEAP_ALLOCATE|[520]|Bytes:48
15:22:32.19 (21510349)|HEAP_ALLOCATE|[139]|Bytes:6
15:22:32.19 (21964936)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:20
15:22:32.19 (22693877)|STATEMENT_EXECUTE|[1]
15:22:32.19 (22973655)|STATEMENT_EXECUTE|[1]
15:22:32.19 (22986089)|HEAP_ALLOCATE|[1]|Bytes:63
15:22:32.19 (23017196)|HEAP_ALLOCATE|[1]|Bytes:4
15:22:32.19 (23126247)|HEAP_ALLOCATE|[52]|Bytes:5
15:22:32.19 (23160985)|HEAP_ALLOCATE|[58]|Bytes:5
15:22:32.19 (23173936)|HEAP_ALLOCATE|[66]|Bytes:7
15:22:32.19 (23968811)|SOQL_EXECUTE_BEGIN|[1]|Aggregations:0|SELECT accountid FROM contact WHERE name = 'Josh Davis' LIMIT 1
15:22:32.19 (32779568)|SOQL_EXECUTE_END|[1]|Rows:1
15:22:32.19 (32814320)|HEAP_ALLOCATE|[1]|Bytes:8
15:22:32.19 (32845514)|HEAP_ALLOCATE|[1]|Bytes:82
15:22:32.19 (32882383)|HEAP_ALLOCATE|[1]|Bytes:8
15:22:32.19 (33178205)|VARIABLE_ASSIGNMENT|[1]|contacts|[{"AccountId":"0010o00002IUiXCAA1","Id":"0030o00002iYsmoAAC","CurrencyIsoCode":"USD"}]|0x27254947
15:22:32.19 (33308734)|STATEMENT_EXECUTE|[2]
15:22:32.19 (33608865)|STATEMENT_EXECUTE|[3]
15:22:32.19 (33616316)|HEAP_ALLOCATE|[3]|Bytes:54
15:22:32.19 (33639440)|HEAP_ALLOCATE|[3]|Bytes:4
15:22:32.19 (33650813)|HEAP_ALLOCATE|[3]|Bytes:7
15:22:32.19 (33697077)|HEAP_ALLOCATE|[3]|Bytes:16
15:22:32.19 (34129384)|SOQL_EXECUTE_BEGIN|[3]|Aggregations:0|SELECT id FROM user WHERE contactid = :tmpVar1 LIMIT 1
15:22:32.19 (39902106)|SOQL_EXECUTE_END|[3]|Rows:1
15:22:32.19 (39930133)|HEAP_ALLOCATE|[3]|Bytes:8
15:22:32.19 (39963598)|HEAP_ALLOCATE|[3]|Bytes:51
15:22:32.19 (40000393)|HEAP_ALLOCATE|[3]|Bytes:8
15:22:32.19 (40120860)|VARIABLE_ASSIGNMENT|[3]|users|[{"Id":"0050o00000XRPDiAAP","CurrencyIsoCode":"USD"}]|0x61f16ea4
15:22:32.19 (40147455)|STATEMENT_EXECUTE|[4]
15:22:32.19 (40252138)|STATEMENT_EXECUTE|[5]
15:22:32.19 (40258841)|HEAP_ALLOCATE|[5]|Bytes:151
15:22:32.19 (40280075)|HEAP_ALLOCATE|[5]|Bytes:4
15:22:32.19 (40935108)|SOQL_EXECUTE_BEGIN|[5]|Aggregations:0|SELECT name, Id, User.Profile.UserLicense.Name FROM User WHERE (Name IN ('Josh Davis') AND User.Profile.UserLicense.Name = 'Partner Community') LIMIT 1
15:22:32.19 (52187053)|SOQL_EXECUTE_END|[5]|Rows:1
15:22:32.19 (52217363)|HEAP_ALLOCATE|[5]|Bytes:8
15:22:32.19 (52268767)|HEAP_ALLOCATE|[5]|Bytes:263
15:22:32.19 (52316751)|HEAP_ALLOCATE|[5]|Bytes:8
15:22:32.19 (52400489)|VARIABLE_ASSIGNMENT|[5]|users2|[{"Name":"Josh Davis","Id":"0050o00000XRPDiAAP","ProfileId":"00e0o0000037emvAAA","CurrencyIsoCode":"USD","Profile":{"Id":"00e0o0000037emvAAA","UserLicenseId":"1000o0000024KwSAAU","UserLicense":{"Id":"1000o0000024KwSAAU","Name":"Partner Community","TotalLicenses":5}}}]|0x4829923e
15:22:32.19 (52440177)|STATEMENT_EXECUTE|[6]
15:22:32.19 (52560644)|STATEMENT_EXECUTE|[7]
15:22:32.19 (52570674)|HEAP_ALLOCATE|[7]|Bytes:58
15:22:32.19 (52600773)|HEAP_ALLOCATE|[7]|Bytes:4
15:22:32.19 (52918914)|SOQL_EXECUTE_BEGIN|[7]|Aggregations:0|SELECT Id FROM Opportunity WHERE Name = 'Edge SLA' LIMIT 1
15:22:32.19 (58615160)|SOQL_EXECUTE_END|[7]|Rows:0
15:22:32.19 (58672705)|HEAP_ALLOCATE|[7]|Bytes:4
15:22:32.19 (58702682)|HEAP_ALLOCATE|[7]|Bytes:0
15:22:32.19 (58806951)|HEAP_ALLOCATE|[7]|Bytes:4
15:22:32.19 (58823112)|HEAP_ALLOCATE|[7]|Bytes:37
15:22:32.19 (59025391)|HEAP_ALLOCATE|[7]|Bytes:46
15:22:32.19 (59693786)|FATAL_ERROR|System.QueryException: List has no rows for assignment to SObject


SELECT Id FROM Opportunity WHERE Name = 'Edge SLA' LIMIT 1 - This is the error.

Cloned
an Opportunity using Edge Installation and named it as Edge SLA and Saved.

Challenge Successful