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
SunnyShinySunnyShiny 

trigger List select where IN Trigger.newMap.KetSet() not a key a different field

Hello

I'm creating a trigger.

I need to male a list with a where condition pointing on a field of the object not the id.

 

Let s image

Object patient and objectB

 

 

objectB (id, name, patientid)

So >>

 

Trigger myTrigger on objectB (,,,,,)

List <Patient>  p = [select id, name from patient

                                   Where in IN :Trigger.newMap.KetSet()];   // but here i need ObjectB.patientid set

 

Thanks for your help

Sunny

Vinit_KumarVinit_Kumar

Sunny,,

 

Can you be little bit more clear about your requirement.

 

Regards,

Vinit

SunnyShinySunnyShiny

sorry ive actually changed the whole logic.

I started this completly wrongly.