• Neel Mota
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hey there

Because I want my test class to work without assuming that certain data is present in the deploy-org, I need to create some partner community users in my test class. As I haven't found any guides on how to do that and because I've failed the last time I tried I'd like to ask the developer community for council.

I think the preconditions to create a partner community user in a test class are:
  • Having an account enabled as partner
    • How to enable an account as partner via apex?
  • Having a contact attached to said account
  • Having a partner community profile
    • Necessary, because we use a custom partner community Profile
    • How to create a representation of our real partner community profile?

Thanks for your advice
Roger