You need to sign in to do that
Don't have an account?
Gaston Lefer
Thsi doesn't works, what am I missing?
Default current contactid
var action = component.get("c.fetchUser"); action.setCallback(this, function(response) { var state = response.getState(); if (state === "SUCCESS") { var storeResponse = response.getReturnValue(); // set current user information on userInfo attribute component.set("v.userInfo", storeResponse); // @@@@@ set default value here @@@@ var getContactId = component.get("v.userInfo.ContactId"); component.set("v.lookupcase.ContactId" , getContactId ) ; }); $A.enqueueAction(action); <aura:attribute name="lookupcase" type="Case" default="{ 'sobjectType': 'Case', 'ContactId': '',}"/> <force:inputField value="{!v.lookupcase.ContactId}" class="slds-input"/>
Thsi doesn't works, what am I missing?
Could you please try printing V.userInfo in console and check v.userInfo.Contactid is populate over there?
Thanks,
Gaurav
Skype: gaurav62990
and check if v.userinfo actually gets updated or not.
Thanks,
Gaurav.
Tring to default the contact id woth the cuurent user contact id (aura:id contact lookup)