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
Haroon AhmadHaroon Ahmad 

Create Trigger on the ProcessInstanceWorkitem object

Hi,

The moment an Approval Request is submitted, I was to capture the Approval Step link, and store it in a custom object.

 

For this reason, I'd like to have a trigger on the ProcessInstanceWorkitem object.

 

But this does not show up in the list of objects against which I can create a Trigger.

 

Is it possible/allowed by the Force.com platform, to create a trigger on the ProcessInstanceWorkitem object?

 

Regards

 

-Haroon

Haroon AhmadHaroon Ahmad

I just got this error, while saving a trigger for the ProcessInstanceWorkitem  in the Force.com IDE:

 

"Save error: SObject type does not allow triggers: ProcessInstanceWorkitem"

 

So I guess triggers are not allowed on this object, probably because it's a system object.

 

But curious to know how I would go about designing a custom approval steps in apex, before or after the approval button was submitted.