I wrote a class that takes a set of ids from the Opportunity and does some actions. The Opportunity Ids are passed when the Opportunity is edited and meets the criteria.

is there a way to pass an id to the class in bulk without editing the Opportunity record?


Opportunity handler:

Set<Id> oppyid = new Set<Id>();


public static void methodstart(Set<Id> oppyis);
 //do stuff...

Of course. You don't have to edit anything. Consider this trivial example:

public static void methodStart(Set<Id> opportunityIds) { }

As long as you don't make any update, delete, or undelete calls on records gathered using these ids, there will be no edits applied to the records.

  • Cool, I was thinking do a anonymous apex to do a query of the ids and then pass them in. – Dan Wooding Jan 24 '17 at 3:20

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.