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
Sangeeth R 5Sangeeth R 5 

when a value is selected in the parent object picklist field ,only certain values should be visible in the child object's picklist field by using only TRIGGER. is it possible

Hemant_SoniHemant_Soni
Hi Sangeeth,
Yes it is possible with trigger.You need to write trigger in after insert event and you need to get values from inserted record and then make a child record with those values.
If it helps you then mark it solved.
Thanks
Hemant
Sangeeth R 5Sangeeth R 5
I'm stuck here.
trigger Parenttrigger on Parent__c (after insert) {
    set<id> parentid=new set<id>();
    for(Parent__c par:trigger.new){
       parentid.add(par.Parent__c.id);
    }
 list<Parent__C> parlst=[select id from Parent__C where P_values__C='1'];