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
Mahadev Wagalgave 9Mahadev Wagalgave 9 

Can we write Trigger on Workflow or WorkflowRule Object

Hello,

I have a scenario where I want to send an email notification after modifying any of the workflow rule. I also want to send the details of the Workflow rule means what were previous values and what are the new values added in the Workflow Rule.

I have googled but I have not found anything. Can anybody have the idea how can I achieve this. 

Thank You,

Regards,
Mahadev
Dutta SouravDutta Sourav

Hi Mahadev,
To restrict updation of Workflow rules,
i. Go to that Particular Profile on which you want to restrict.
ii. Click "Edit" and find "Administrative Permissions" section.
iii. Uncheck  "Customize Application" option.

Mahadev Wagalgave 9Mahadev Wagalgave 9
Thank you for your quick reply Sourav.

I don't want to restrict the updation on workflow rules. I want to implement the functionality like this :

Whenever any user (User XYZ with Standard or System Admin Profile ) modifies workflow rule, I want to send a notification to the particular alias stating that this user has modified the Workflow Rule and the Changes he/she made as ....

 
Dutta SouravDutta Sourav

Mahadev,

I don't think notification can be sent automatically to the System Administrator.

But, You can try this:

Set Up> Security Control> View Setup Audit Trail.

The setup Audit Trail history shows you the 20 most recent Setup changes made to your organization.
It gives insight into an array of important information regarding the changes to your Salesforce instance over the last 6 months.

Download the .csv file & find there.

Hope it will help.