Quantcast
Channel: userinfo.getuserid() returning null in test class - Salesforce Stack Exchange
Browsing latest articles
Browse All 3 View Live

Answer by Skumar for userinfo.getuserid() returning null in test class

Issue is resolved The null pointer exception was due to Account record which was not getting inserted due to invalid Account ID field in createUser method. Due to that, as there is no partner account,...

View Article


Answer by sanket kumar for userinfo.getuserid() returning null in test class

You are passing null manually in your code. See below:- user u = handler.createUser(null, sampleData); This is why you are getting the issue. Here you have done correctly:- kc_RegHandler authP = new...

View Article


userinfo.getuserid() returning null in test class

I have a test class which inserts partner user for testing. So, when I pass userinfor.getuserID(), it is returning null due to which my test class is failing with error "System.NullPointerException:...

View Article
Browsing latest articles
Browse All 3 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>