Last active
November 19, 2019 07:59
-
-
Save mhamzas/ed8831430c26adeb7bfc694fe405fab6 to your computer and use it in GitHub Desktop.
Custom Case Deflection in Lightning Community [aura]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ({ | |
| itemsChange : function(component, event, helper) { | |
| var appEvent = $A.get("e.selfService:caseCreateFieldChange"); | |
| appEvent.setParams({ | |
| "modifiedField": event.getSource().get("v.fieldName"), | |
| "modifiedFieldValue": event.getSource().get("v.value") | |
| }); | |
| appEvent.fire(); | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <aura:component implements="forceCommunity:availableForAllPageTypes" access="global" > | |
| <aura:registerEvent name="appEvent" type="selfService:caseCreateFieldChange"/> | |
| <lightning:recordEditForm aura:id="recordEditForm" objectApiName="Case"> | |
| <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" /> | |
| </lightning:recordEditForm> | |
| </aura:component> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment