TransWikia.com

Issue in Guest User : post Summer release 2020

Salesforce Asked by Suggs on October 4, 2021

We have implemented a custom functionality where we created an apex web-service and have hosted it on force.com sites. The functionality creates a lead if email is found , and if account is present it creates an opportunity. This was working fine before the release in all sandboxes as well as production but now its throwing a null pointer exception.

Below is a small snippet of it.

List<Id> ownerIds = new List<Id>{};
        for(Opportunity opp : opps){

            ownerIds.add(opp.OwnerId);
        }
        system.debug('ownerIds'+ownerIds);
        list<user> m=[SELECT Id,UserRole.Name
                                FROM User where id =:ownerIds];
                                
        system.debug('User list '+m);

This list was returning values before but now its not returning. This snippet exists in opportunity trigger and as trigger runs in system mode, it should return value in the list .

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP