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
sjain1.2523113033806995E12sjain1.2523113033806995E12 

Test method Coverage for site.createPortalUser method for Registration

Hi,

      i want to know how to cover the site.createportaluser() method in testmethods. when i run the class which creates customer portal user through this methods.when run the class this method always returns null. Any help would be great appreciable.

string Userid = site.createportaluser(u,accountid,null);

Ryan-GuestRyan-Guest

In tests Site.createPortalUser(u, accountId, password); always returns null. You can assert for that if you need to.