-
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 ago by
Manjunatha.
-
This discussion was modified 5 years ago by
Forcetalks.
-
This discussion was modified 5 years ago by
Forcetalks.
-
This discussion was modified 5 years ago by
Log In to reply.
Popular Salesforce Blogs

Salesforce Marketing Cloud for Healthcare's Personalized Revolution
In today's competitive landscape, engaging patients and driving outcomes is vital. But legacy systems and siloed data often stand as formidable barriers. Enter Salesforce Marketing…

Dreamforce 2022 - An Overview of the Salesforce Largest Software Conference
Hello Trailblazers, are you ready to attend the most impactful Dreamforce event ever? This year will be an extra special and epic Salesforce family reunion…

Debunking the Big 5 Myths about Salesforce Marketing Cloud
The Salesforce suite is a complicated platform. Your business, promoting, and client care groups can utilize it to make synchronized campaigns. It can follow your…
Popular Salesforce Videos
Guided Selling with Salesforce CPQ
Do you know how to set up guided selling in Salesforce CPQ? In this demo video, we'll show you three easy steps to set up…
Create Custom Auto Number Field With Your Criteria Using Flows | Salesforce
Have you ever want to have an auto number field but it only populates when certain criteria were met on a record? Now you can…
Get Together Safely with Salesforce Safety Cloud
Learn how Safety Cloud helps people get together in person, safely. Safety Cloud helps businesses and communities better manage their testing, health and entry protocols…
Popular Salesforce Infographics

How to Create a Community of Trust and Gratitude with Salesforce
The businesses that will be remembered positively after COVID-19 are extending empathy and grace to their employees, customers, and communities. We’ve seen so many communities…

The Timeline: 20 Years of Salesforce
Salesforce completed 20 years recently. The celebrations were grand with thousands of employees and trailblazers and Ohana family joining in. The world’s no. 1 CRM…

Salesforce Implementation Service
Revolutionize your business with the power of Salesforce Implementation Services! Unleash unparalleled efficiency, seamless collaboration, and unparalleled growth. Our latest infographic breaks down the key…