function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Matrix ReturnsMatrix Returns 

Lightning look up filter

Hi All lightning Experts ,
I am facing a issue . 
I have three objects let A,B and C .
A is parent of B and C .

I have  created a junction object . 'JunObj' .. between B and C . On B object I have created a action button from there we can create a 'junObj' Records . 
What i m trying to do is I want to select C which only associated to A object(in related list ) which is selected on B object record  as parent not all the C   
User-added image
Alain CabonAlain Cabon
Hi,

Did you try a Roll-Up Summary Field count_B__c (COUNT B) in the A object? 

The big constraint is that the relationship between A and B must be a master-detail relationship in that case (otherwise you need a trigger).

From C, you can filter A with A.count_B__c = 0
 
krisstannum1krisstannum1
Based on my understanding, here's what i believe you want to happen?

1. Query all records in A where B is parent
2. Query all records in C where A is in the resulting records from 1.
3. Display Results from 2.