You need to sign in to do that
Don't have an account?
Sachin Bhalerao 17
Attribute value is not capturing in controller.js file
Dear Team ,
Greetings !!!
In controller file this attribute value is not getting captured var tempAccount = component.get('v.accObj');
I defined in component file in this way
<aura:attribute name="accObj" type="Questions__c" default="{ 'sobjectType' : 'Questions__c',
'Name' : '',
'Does_Lightning_Component_uses_Javascript__c' : ''
}"/>
<ui:inputText label="Name" value="{!v.accObj.Name}"/>
Please let me know where i am making mistake.
Thanks & Regards
Sachin Bhalerao
Greetings !!!
In controller file this attribute value is not getting captured var tempAccount = component.get('v.accObj');
I defined in component file in this way
<aura:attribute name="accObj" type="Questions__c" default="{ 'sobjectType' : 'Questions__c',
'Name' : '',
'Does_Lightning_Component_uses_Javascript__c' : ''
}"/>
<ui:inputText label="Name" value="{!v.accObj.Name}"/>
Please let me know where i am making mistake.
Thanks & Regards
Sachin Bhalerao
Hi sachin,
If you want the attribute values you have to access them individually.
Try like this
var tempAccount = component.get('v.accObj');
var tempName = tempAccount.Name;
If you are not looking for this can you please share the complete code,so that i can help you.
Hope this helps you
If this helps kindly mark it as solved so that it may help others in future.
Thanks and Regards
All Answers
Hi sachin,
If you want the attribute values you have to access them individually.
Try like this
var tempAccount = component.get('v.accObj');
var tempName = tempAccount.Name;
If you are not looking for this can you please share the complete code,so that i can help you.
Hope this helps you
If this helps kindly mark it as solved so that it may help others in future.
Thanks and Regards
Now m going to let you know the exact situation . M creating small project for optional test series in which user can select value from radio button and if this value get matched with default value of picklist in custom object data inserted in that field will be 1 . Plz have a look on sample code and snapshot of custom object
Thanks & Regards
Sachin Bhalerao