The standard case form component includes a case deflection component. Unfortunately we need our case form to do some things that are beyond the standard case form functionality. Is there a way to use the case deflection component on it's own? If not does anyone know if the logic is more complicated than executing a search on knowledge with the case title?

I hate that we have to replicate these components to add functionality to parts of them


You can use the case deflection component on its own, just need to tweak your form to register the event used by the deflection component and fire it with the field + field value parameters on field change or blur, for example:


<aura:component implements="forceCommunity:availableForAllPageTypes" access="global" >

    <aura:registerEvent name="appEvent" type="selfService:caseCreateFieldChange"/>

    <lightning:recordEditForm aura:id="recordEditForm"

    <lightning:messages />

    <lightning:inputField fieldName="Subject" onchange="{!c.itemsChange}"/>
    <lightning:inputField fieldName="Description" onchange="{!c.itemsChange}"/>

    <lightning:button class="slds-m-top_small" type="submit" label="Create new" />



 itemsChange : function(component, event, helper) {           
        var appEvent = $A.get("e.selfService:caseCreateFieldChange");
            "modifiedField": event.getSource().get("v.fieldName"),
            "modifiedFieldValue": event.getSource().get("v.value")


Notice, the OOTB community Case Deflection component will update automatically.

  • where did you find the documentation for the event selfService:caseCreateFieldChange? I can't find it anywhere...
    – mascot
    Mar 21 '19 at 14:33
  • There isn’t any, we got access to it as an ISV
    – glls
    Mar 21 '19 at 14:47
  • This code is not working for custom fields. Is this event only works for standard fields? Aug 19 '19 at 18:18
  • its unclear what you are attempting to do, or how. please open a new post and show us the code.
    – glls
    Aug 19 '19 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.