The component is not using the 'DisplayCaseController' Apex controller

Use the below code:

Controller Code:

    getCase: function(cmp){
        var action = cmp.get("c.getCaseFromId");
        action.setCallback(this, function(response){
            var state = response.getState();
            if (state === "SUCCESS") {
                cmp.set("v.record", response.getReturnValue());

Component Code:

<aura:component controller="DisplayCaseController">
<aura:attribute name="record" type="Case"/>
    <ui:button label="Get Case" press="{!c.getcase}"/>


No comments:

Post a Comment

Sharing is Caring!!! Share this with your friends!!!

submit to reddit