You need to sign in to do that
Don't have an account?
AkhileshSingh
pre populate the value on custom lightning look up on lightning page
Hi ,
I am using custom account lookup on lightning page (this look up is using inside quick action of opportunity page.).I have another standard account lookup on opportunity detail page. I want to prepopulate the value of standard acccount look up on custom account lookup on lightning page.
so whenever i change the value of standard account look up on opportunity detail page .that value is reflect on custom lightning look up.
I am using code for custom account lookup
https://sfdcmonkey.com/2017/07/17/re-usable-custom-lookup/
I am using custom account lookup on lightning page (this look up is using inside quick action of opportunity page.).I have another standard account lookup on opportunity detail page. I want to prepopulate the value of standard acccount look up on custom account lookup on lightning page.
so whenever i change the value of standard account look up on opportunity detail page .that value is reflect on custom lightning look up.
I am using code for custom account lookup
https://sfdcmonkey.com/2017/07/17/re-usable-custom-lookup/
Use doInit() method on lightning component on load to get the data Standard lookup data on the custom one.
I am calling below custom account look up
<c:AccountLookup objectAPIName="account" IconName="standard:account" label="Account Name" selectedRecord={!v.selectedLookUpRecord}"/>
In DOiNit :
if(responsevalue[0].Partner__c)
{
var partnerName = responsevalue[0].Partner__r.Name;
component.set("v.selectedLookUpRecord",partnerName);
}
but still value is not prepopulate on custom Account look up .
This won't work as selectedLookUpRecord is setting late as compared with the modal iteself and you won't be able to refrsh the modal view once your attribute is set.
What you can do is a workaround : Use aura:if to show the Account name as text if Standard lookup has a value, and use an inline edit utility button which when clicked, your custom lookup component appears.