tag:blogger.com,1999:blog-2563180596812825704.post1103212603917684335..comments2024-03-20T11:41:12.794-07:00Comments on Forcetrails: Send Custom Notification using apex | Salesforce | Messaging.CustomNotificationRahul Gawalehttp://www.blogger.com/profile/17790026688078884559noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-2563180596812825704.post-42408574533052175832021-08-17T08:16:07.982-07:002021-08-17T08:16:07.982-07:00I think yes if you provide the relative URL of the...I think yes if you provide the relative URL of the list view as a link in the notification, but I haven't tried yet.Rahul Gawalehttps://www.blogger.com/profile/17790026688078884559noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-43857050065997903292021-08-17T05:58:50.768-07:002021-08-17T05:58:50.768-07:00Hey, do you know if is possible to open a list vie...Hey, do you know if is possible to open a list view on notification clicking?Anonymoushttps://www.blogger.com/profile/10519532076535981448noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-49493925160885748272021-08-16T01:22:48.018-07:002021-08-16T01:22:48.018-07:00Hi Rajesh, yes there are some limitations, like 50...Hi Rajesh, yes there are some limitations, like 500 types of notifications and 10000 notifications per hour per org. Here you can find more details on that <a href="https://help.salesforce.com/s/articleView?id=sf.process_limits_customnotification.htm&type=5" rel="nofollow">Considerations for Processes that Send Custom Notifications</a>Rahul Gawalehttps://www.blogger.com/profile/17790026688078884559noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-60823006966512450272021-08-14T21:18:01.743-07:002021-08-14T21:18:01.743-07:00Hi Rahul,
Is there any limitation around the send...Hi Rahul,<br /><br />Is there any limitation around the send method like below,<br />1. In a transaction how many times we can call send() method<br />2. Can we call this send() method via future, batch , queueable apex <br /><br />Thank You,<br />Rajesh Adiga P.Anonymoushttps://www.blogger.com/profile/02294321161950223593noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-20628303275351098392021-05-18T04:51:34.836-07:002021-05-18T04:51:34.836-07:00Hi LOCATA,
I have never written test class for th...Hi LOCATA,<br /><br />I have never written test class for this. Are you getting any error in the test class? I think you wont be able to verify in test if the message was sent or not. If you can specify the problem you are facing I am happy to help.Rahul Gawalehttps://www.blogger.com/profile/17790026688078884559noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-36037106260930376132021-05-18T01:25:22.584-07:002021-05-18T01:25:22.584-07:00Hi Rahul Gawale,
Thanks for your post. It really ...Hi Rahul Gawale,<br /><br />Thanks for your post. It really helpful.<br />But I can't run it in Test Class. Test Class can't create or find this Custom Notification.<br />Can you show me your test class.<br />Thank you so much..!<br /><br />LOCATAhttps://www.blogger.com/profile/14798828938408179584noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-63063175179036129412021-02-23T22:13:40.236-08:002021-02-23T22:13:40.236-08:00Hi Muyeen, I think as of now you can't do that...Hi Muyeen, I think as of now you can't do that. You need to call it multiple times.Rahul Gawalehttps://www.blogger.com/profile/17790026688078884559noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-59021368268641863012021-02-23T09:44:07.496-08:002021-02-23T09:44:07.496-08:00I understand we can provide the user Ids in the se...I understand we can provide the user Ids in the set, but I wanted to know how do I send different notifications using a list? is there a send function that processes list of notifications?muyeenhttps://www.blogger.com/profile/14051067196442685972noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-86527250306974732812021-02-22T05:46:38.702-08:002021-02-22T05:46:38.702-08:00Hi Muyeen! You can send the same notification to m...Hi Muyeen! You can send the same notification to multiple users by providing list of user ids. For limitations see <a href="https://help.salesforce.com/articleView?id=sf.process_limits_customnotification.htm&type=5" rel="nofollow">this post</a>.Rahul Gawalehttps://www.blogger.com/profile/17790026688078884559noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-52115928467450718032021-02-22T03:26:07.698-08:002021-02-22T03:26:07.698-08:00What is the limit to send the custom notifications...What is the limit to send the custom notifications? also if I have many custom notifications is there a way to put it in a list and send?muyeenhttps://www.blogger.com/profile/14051067196442685972noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-35089372730809879432021-01-14T18:25:12.132-08:002021-01-14T18:25:12.132-08:00Hi Nithya, you need to merge the feilds in the tex...Hi Nithya, you need to merge the feilds in the text bebore putting it into notification body.Rahul Gawalehttps://www.blogger.com/profile/17790026688078884559noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-58012858460396730512021-01-14T12:31:43.512-08:002021-01-14T12:31:43.512-08:00Hi ,
How to include merge function in the body of ...Hi ,<br />How to include merge function in the body of the notificationNithya Gopihttps://www.blogger.com/profile/04365551813972049258noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-80243954543205329532020-10-26T01:39:01.725-07:002020-10-26T01:39:01.725-07:00this example will send a notification to a record ...this example will send a notification to a record page of the record whos Id is passed to the setTargetId method. i am not sure about the pagereference. Why you want to do so?Rahul Gawalehttps://www.blogger.com/profile/17790026688078884559noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-33315099179948239272020-10-23T23:50:08.388-07:002020-10-23T23:50:08.388-07:00Rahul, any example to send notification to a Light...Rahul, any example to send notification to a Lightning record page or Component with parameters? Basically using 'pageReference' option.Vamsee Peddireddihttps://www.blogger.com/profile/18103360514236148092noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-5836483851546435892020-10-23T06:08:29.019-07:002020-10-23T06:08:29.019-07:00Hi manikanta, this error has nothing to do with Cu...Hi manikanta, this error has nothing to do with CustomNotification. please check if there is any callout in your code. You might need to write mock class for that.Rahul Gawalehttps://www.blogger.com/profile/17790026688078884559noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-52616802359046714462020-10-23T00:26:22.317-07:002020-10-23T00:26:22.317-07:00Hi Rahul,
I am getting this error , if i call the ...Hi Rahul,<br />I am getting this error , if i call the method .<br /><br />Error : Methods defined as TestMethod do not support Web service callouts.<br /><br />Please help how to resolve this.<br /><br />Thanks..!manikantahttps://www.blogger.com/profile/04153788826207298385noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-43836604149317004882020-10-20T09:42:32.905-07:002020-10-20T09:42:32.905-07:00Hello Mr./Ms Unknown!!
Simply call the method whi...Hello Mr./Ms Unknown!!<br /><br />Simply call the method which is sending the notification in your test method. This code runs just fine in the test environment. But note that you can not assert if the notification is sent or not.Rahul Gawalehttps://www.blogger.com/profile/17790026688078884559noreply@blogger.comtag:blogger.com,1999:blog-2563180596812825704.post-67397241227672276932020-10-19T21:49:14.671-07:002020-10-19T21:49:14.671-07:00How to write test class for the Custom notificatio...How to write test class for the Custom notification from apexAnonymoushttps://www.blogger.com/profile/05122089454651776252noreply@blogger.com