2

I have created an article type named knowledge and would like to be able to create them from an app layout using force:createRecord, however, the modal box does not render any fields, nor do I get any error message. Is this functionality supported for knowledge article types?

my component markup is as follows:

  <div class="slds-form-element">
      <ui:button label="Article" press="{!c.createKnowledge}"
            class="slds-button slds-button--brand" />
  </div>

my controller is as follows:

({
createKnowledge : function (component, event, helper) {
    var createRecordEvent = $A.get("e.force:createRecord");
    createRecordEvent.setParams({
        "entityApiName": "knowledge__kav"
        });
      createRecordEvent.fire();
    }
})

this is what is rendered: enter image description here

2
  • Can you check the FLS on the Knowledge object?. It might be a reason too.
    – Praveen
    Commented Apr 3, 2017 at 1:50
  • 2
    thanks, I figured it out, need to enable lightning knowledge (Beta) from classic
    – glls
    Commented Apr 3, 2017 at 1:57

1 Answer 1

3

Looks like lightning knowledge needs to be enabled for this functionality to work. Functionality was added with Spring '17 and is documented here

Here’s how to move to Lightning Knowledge.

Make sure that your org meets all the prerequisites.

-You must have only one article type, be in single language mode, and have no more than 300 data categories.

-From Setup, enter Knowledge in the Quick Find box and click Knowledge Settings.

-Under General Settings, select Enable Lightning Knowledge.

And last but not least, an IMPORTANT note:

After you enable Lightning Knowledge, you can’t go back to Classic Knowledge. Only enable Lightning Knowledge if you’re prepared to permanently move Knowledge to Lightning Experience.

You must log in to answer this question.

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