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
Test1 23478Test1 23478 

Trigger on Reports

How to write trigger to get 

Created Report for Leads. Whenever notes in Lead Object added/created , that notes content should get reflect in a seperate column as description in Reports.So how to write trigger on this. Please support. 

AbhishekAbhishek (Salesforce Developers) 
Hi,

You should be able to do that via Subscribe to Get Report Notifications feature. (https://help.salesforce.com/articleView?id=reports_notifications_home.htm&type=5)
On the Report Run page, click Subscribe.
On the Report Subscription page, choose whether to be notified each time conditions are met or only the first time.
Specify each condition in three parts: aggregate, operator, value. For example, trigger notifications whenever the sum of the amount is less than $1 million.


Aggregate is the metric that’s the basis of your condition. It can be Record Count, Average Amount, Smallest Amount, Largest Amount, or Sum of Amount.
The operator is the basis of comparison, such as Equal, Not Equal, Greater Than, and so on.
Value is the number that you want the aggregate compared to.
Your conditions are evaluated when the report is run, and notifications are sent if all conditions are met (up to five conditions per report).


Schedule how often (every weekday, daily, or weekly) and when to evaluate for your conditions. For example, run the report every weekday at 7 a.m.


Select one or more notification types.
Send a Salesforce1 in-app notification
Post to Chatter
Send an email notification
Execute a custom Apex action, such as creating tasks or escalating cases


For more information about developing a custom Apex class, see the Apex Developer Guide.
Make sure that the subscription is active if you’re ready to start receiving notifications.
Click Save to schedule the notifications.

I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Thanks.