You need to sign in to do that
Don't have an account?
Gaston Lefer
aura attribute dynamic default value
How do you set a dynamic aura attribute default value like current userinfo instead of hardcoding. See below.
The harcoding accountid works, not dynamic contactid/not supported.
The harcoding accountid works, not dynamic contactid/not supported.
<aura:attribute name="lookupcase" type="Case" default="{ 'sobjectType': 'Case', 'ContactId': '{!v.userInfo.ContactId}', 'AccountId': '0012D000002oAkt' }"/>
javaScript controller :
i hope it helps you.
Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
thanks
http://sfdcmonkey.com (http://sfdcmonkey.com )
All Answers
javaScript controller :
i hope it helps you.
Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper solution for others
thanks
http://sfdcmonkey.com (http://sfdcmonkey.com )
I am using lookup field for Owner Id for my custom Object Visit__c. NOT able to set a value on DOINIT Method
<aura:attribute name="Visits" type="Visit__c" default="{'sobjectType':'Visit__c','OwnerId':'','Owner':{'sobjectType':'','Name':''}}"/>
<force:inputField aura:id="visitTeamlookup" value="{!v.Visits.OwnerId}"/>
Tried all these below solutions :
component.find("visitTeamlookup").set("v.Visits.OwnerId" , '0051N000005InMFQA0');
component.set("v.Visits.Owner.sobjectType" , 'User');
component.set("v.Visits.Owner.Name" , 'Development Admin');
component.set("v.Visits.OwnerId" , '0051N000005InMFQA0' ) ;
Nothing works.