[SalesForce] Enable Lightning Knowledge in scratch org

We are trying to use the new Salesforce DX paradigm and have created a org profile with knowledge enabled.

As we are using lightning, we also want check the Lightning Knowledge but:
– It's not a selectable feature for the org, so we can't put it in the definition file;
– If we do it manually, it doesn't pull into our source control.

How should we manage this? It's not very workable to manually enable lightning knowledge before pushing the source code to the org.

Thank you in advance.

Best Answer

You need to include the enableLightningKnowledge tag in your src/settings/Knowledge.settings file. This will enable it for the org, not just the user. Notice that it is different than just enabling Knowledge.

enableLightningKnowledge

What's frustrating is that this setting is not called out in the metadata api documentation for KnowledgeSettings

I discovered this by manually enabling this setting in a sfdx scratch org and did a sfdx force:source:pull

Related Topic