Salesforce Asked by sumitsing ingle on November 23, 2020
I am working on a lightning component where I want to show picklist field using as follows. `
<aura:component >
<aura:attribute name="conObj" type="Contact" default="sobjectType:'Contact'}"/>
<force:inputField value="{!v.conObj.Salutation}" aura:id="pic"/>
</aura:component>
`
The above code works fine in my developer org but not working on sandbox. When I try to run this by adding in an app throws some exception. Although same component works in same sandbox if I replace inputField with outputField.
Is there any solution for this ?
Please try the below code.formatted syntax
You have missed curly braces for default attribute
<aura:attribute name="conObj" type="Contact" default="{ 'sobjectType' : 'Contact' }"/>
<force:inputField value="{!v.conObj.Salutation}" aura:id="pic"/>
Answered by AMDB6 on November 23, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP