0

Is it possible to use SOQL to list new opportunity contact roles added after a certain date? Ideally I'd like to schedule some apex that runs nightly, queries all new OCRs since the last run, then applies a change to the contacts -- but can this be done with just the new ones, or would it affect all OCRs each time it runs?

2

Hi Matt this is possible. SOQL on Opportunity Contact Role

You can query opportunity Contact Role and have a scheduled batch to perform intended operations on newly created opportunityContactRole. Make sure you apply proper filter like using CreatedDate > :LAST_RUN or CreatedDate = TODAY [Considering you are processing all records.]

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.