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
ForceLoverForceLover 

only portal users can be associated to a contact: []

Hi,

 

Need a confirmation, my org don't have any portal user licenses.But i created a method in a test class which will create a portal user.It is saved successfully without any error.But i used this method in some other test class while i'm running second test class it is failing with the following error message

 

System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, only portal users can be associated to a contact: []

 

why i'm getting this error because of not having licenses or some other please confirm me.

digamber.prasaddigamber.prasad

Hi,

 

Yes you are getting this error because you don't have license.