I have a class where i have created portal user. when i am testing the functionality it works fine.
Problem occurs when writing a test class –
When writring the test class for business class method of portal user creation. its giving me the error.
Error –
Thanks
Your Reply will Highly appreciated
Best Answer
Have you linked the contact to the specific account in your code before calling method to create portal user?
I couldn't see contact linked with Account in your test method.
Add one more line in the code which inserts contact.
Please try.Hope that solves the issue!