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
Harish1234Harish1234 

how we will call a workflow by using apex class?

Hi,

    how we will call a workflow by using apex class?
Grazitti TeamGrazitti Team
Hi saihareesh sapram,

you can not call the Workflows using apex,
work flows fires itself when it meets the criteria,

Mark it best answer if you find it a solution,
Thanks and regards,
Grazitti Team
Darshan FarswanDarshan Farswan
Hi Saihareesh,

There is no way to invoke any particular Workflow from APEX. But the simplest way it to update/insert the record. Every single time the record is updated and depending upon the WF criteria, the Workflow will run.

But also take a note that, if you update the record in APEX, all the related Workflows and triggers will fire as well.

Thanks
Darshan