You need to sign in to do that
Don't have an account?
Lookupfield related query
Hi Developer Community ,
recently i have copied a code for custom lookup field from github , this is a custom component which have .cmp, .js, .helper and a apex class
what this look up field is , we can keep this lookupfield component in any component like in this way
<aura:component> <c:lookupField objectAPIName="Competition__c" label="PRIMARY COMPETITION" returnFields="['Name','Opportunity__c']" queryFields="['Name']" selectedId="{!v.selectedId}" /> </aura:component>
my issue is i kept this lookup field in a component and kept in a opportunity record page , when ever i click on this look up field i need to display only values related to this opportunity record , but it is showing all records irrespective of opportunity record
so i have seen the code in lookupfield.cmp
it looks like this component is built in a way that can be used for any object , but in my case i want to queryfields only related to opportunity record ,
can anyone please tell me how to solve this issue , i will keep the link of the github here
click here for link (https://github.com/Chaos-Tech-Corp/Input-Field-Lookup)
Thanks in advance
>> https://www.forcetalks.com/blog/create-a-search-bar-key-to-search-account-name-using-lightning-component/
The above link has an implementation that is similar but is for specific object you can try checking it and modify it to fit your opportunity object instead of the used example.
Let me know if it helps you and close your query by marking it as the best answer so that it can help others in the future.
Thanks.
the link which u shared is only displays records , but in my task , records need to displayed and i need to select and store that value in an attribute