Activity Forums Salesforce® Discussions How to cover a user in Salesforce test class?

  • Deepak

    Member
    December 6, 2019 at 12:31 PM

    Create a new user and assign it a profile and role by querying and insert the user.

    You can also cover in a different way by creating an account and a related contact. Enable account as partner user then create a user, assign it a partner profile and add contactid in user.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Pros & Cons of Lightning Component vs. 3rd party frameworks in Salesforce UI development

Video in

Nikita drops by to share his invaluable experience of using popular 3rd party frameworks in Salesforce. http://media.blubrry.com/salesforceway/audio.xmcdn.com/group42/M05/25/57/wKgJ81rXk6XjaZIAAU_I_KtprFM998.m4a