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
PARISE RAVIKIRANPARISE RAVIKIRAN 

System.QueryException: List has no rows for assignment to Sobject Class.LeadTriggerUtilityTest.assignPartnerLeadsResellTest: line 1018, column 1

static void assignPartnerLeadsResellTest() {
        User aPartnerUser = [
            SELECT Id, UserName, ProfileId, Profile.Name, ContactId, Contact.Name, Contact.AccountId 
            FROM User 
            WHERE Email = 'puser000@testlead.com'
        ];
 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi ,

Generally this type of error occurs when the query is not returning any number of rows.

Please check if this query is giving you any result?

Please find the below article for same .

https://help.salesforce.com/s/articleView?id=000385697&type=1 (https://help.salesforce.com/s/articleView?id=000385697&type=1)

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,