-
How to get the IP address of the user's system in apex when they try to create a case in Salesforce?
Hi, I am facing an issue with cases in Salesforce, recently they were a lot of spam cases that have been created from web to case.
and this is not the first time it happened earlier also. So we have created validation rule on case to avoid spamming based on the subject, body, sender, etc but it's just a temporary solution because every time we receive a different kind of data, as soon as we get to know about spamming we are checking the values and adding those values in the validation rules to avoid further case creation.But now we have come up with the below solution.
Creating an IP address field on case object, on the creation of case in salesforce we are saving the IP address of the system which we received the data from. so our motto is whenever more cases are created from the same IP address (10+ cases within 24 hours from the same IP address) then we are going to block that IP address temporarily. So I think by implementing this we can prevent spam cases creation in salesforce.
Question is:
How to get the IP address of the user's system in apex when they try to create a case?
And please do let me know if you have a better solution.
-
This discussion was modified 5 years, 2 months ago by
Manjunatha.
-
This discussion was modified 5 years, 1 month ago by
Forcetalks.
-
This discussion was modified 5 years, 1 month ago by
Forcetalks.
-
This discussion was modified 5 years, 2 months ago by
Log In to reply.
Popular Salesforce Blogs

Salesforce and Gmail Integration | The Perfect Integration Guide
Salesforce Gmail Integration Gmail is a free Web-based Mail service that provides users with gigabytes of storage for emails and information and provides the ability…

Why Should you Invest in Salesforce Training and Change Management?
When you invest in a CRM such as Salesforce, it is easy to focus on the implementation itself. You need to consider how you will…

How to Clone a Record In Apex?
What is Clone Record in Apex? The clone() method in Salesforce Apex makes a duplicate of the sObject record. There are four Boolean-type optional parameters…
Popular Salesforce Videos
How to Get a Mentor? | Salesforce Learning | The Shrey Sharma Show
Looking for a mentor for Salesforce Learning? Watch this video to learn how to find one. Watch the full Video: https://youtu.be/6oi2zdJCFhs Check out the book:…
Marketing Cloud Connect: View Full Resolution Emails in Sales or Service Cloud
Thumbnails don't always cut it. Sometimes you need the full resolution Marketing Cloud email in Sales or Service Cloud to see what was sent to…
Salesforce Career Path 2022 | How to Make Career in Salesforce
In addition, Salesforce Developer is one of the 10 best jobs on Indeed's Best Jobs. As businesses embrace the future of mobile, big data, IoT,…
Popular Salesforce Infographics

Top Salesforce Trends For 2023
When it comes to managing customer databases, Salesforce is leading the pack. Companies are increasingly relying on this powerful tool for its unrivalled flexibility and…

9 Steps for Building a Useful Price Quote Template
Price quotes are among the most fundamental components of a sales unit’s library, yet too many sales managers treat quotes as a perfunctory measure that…

A Day in the Life Infographic: Best Practices Guide for Sales Users
The internet is full of sales best practices. But what most people forget is that, as a business, you need to come to the understanding…