9

Since Winter20, we have some test classes failing because of new Community Setting Allow using standard external profiles for self-registration and user creation.

The problem is that we have automated tests performed on scratch orgs fully generated by a Jenkins build, so we have no way to manually update the configuration (cf screenshot 1) , as it is a headless job

I tried to find the right configuration value for project-scratch-def , but it is not documented, and not even related to metadata WSDL file (cf screenshot 2)

Please a super hero could save us from this new "gift" provided by Salesforce Winter20 platform upgrade, and find a workaround to activate Allow using standard external profiles for self-registration and user creation only using scripts and no manual action ? <3

enter image description here

enter image description here

2 Answers 2

9

It's undocumented but it is available as enableOotbProfExtUserOpsEnable property in the communities settings metadata as of v47 (Winter '20). If you select the Allow using standard external profiles for self-registration and user creation checkbox and then retrieve the settings metadata using this package

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Communities</members>
        <name>Settings</name>
    </types>
    <version>47.0</version>
</Package>

you'll see the following response (redacted below for brevity)

<?xml version="1.0" encoding="UTF-8"?>
<CommunitiesSettings xmlns="http://soap.sforce.com/2006/04/metadata">
    ... 
    <enableOotbProfExtUserOpsEnable>true</enableOotbProfExtUserOpsEnable>
    ...
</CommunitiesSettings>

You should be able to update it.

1
  • Works perfectly, thanks <3 Commented Oct 22, 2019 at 9:24
4

In addition to identigral great answer, here is the corresponding code for scratch org creation (project-scratch-def.json)

"settings": {
    "communitiesSettings": {
        "enableNetworksEnabled": true,
        "enableOotbProfExtUserOpsEnable": true
    },
1
  • 1
    Thanks Nicolas for posting this. Fixed the problem for me (once I updated SFDX to the latest version to get API 47 automatically).
    – Keith C
    Commented Oct 29, 2019 at 16:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .