Skip to main content The Trailblazer Community will be unavailable from 2/1/2025 to 2/2/2025. Please plan your activities accordingly.
Hello, I am trying to use "force:inputField" to create type-specific input component implementation based on the data type to Create Account Record. 

Here is what I did : 

In cmp file : 

<aura:handler name="init" value="{!this}" action="{!c.doInit}" />

<aura:attribute name="account" type="Account" default="{ sobjectType: 'Account' }"/>

 <force:inputField value="{!v.account.Name}" />

In Controller :

doInit: function(component, evt, helper) {

         var action = component.get("c.getAccount");

        action.setCallback(this, function(a) {

            console.log(a.getReturnValue());

                component.set("v.account", a.getReturnValue());

            

        });

        $A.enqueueAction(action);

    },

I can see the v.account value if I use ui:inputText, so it is not the problem of javascript or apex code. I did not got any error,  only a blank page with nothing in html markup, the javascript function is not event executed. 

Please help me ! Thanks a lot 
4 answers
Loading
0/9000