How can we create test record for "WebStoreNetwork" object in test class?-

548 views Asked by At

I need to create record of WebStoreNetwork in my test class.

SELECT WebStoreId
          FROM WebStoreNetwork
          WHERE NetworkId = :communityId
          WITH SECURITY_ENFORCED

This is the query which is not getting covered in my test class. I am getting value in communityId variable in test class. Facing error "List has no rows to assignment". Does anyone have any idea? Thanks.

1

There are 1 answers

0
Jeferson Chaves On

I suggest you post to Salesforce StackExchange.

But a direct answer is that as of Dec-2022 is not possible.

As of the next release, it should be: see Spring'23 release notes.