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
Ankit Khurana24Ankit Khurana24 

how to move opprtunity related contacts to camapign member.

" i need to make a scheduler which will find all opportunity whose status is lost and will create campaign for them and add their contact as campaign member" 


 now how will i find all the contacts related to an opprtunity and how do i move then under an campaign.

Where do you find the issue ? Create a schedule class and query for lost opportunities where you will find the contacts. Once you have the contacts just create a campaign and add them as contact members ..