-
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, 10 months ago by
Manjunatha.
-
This discussion was modified 5 years, 10 months ago by
Forcetalks.
-
This discussion was modified 5 years, 10 months ago by
Forcetalks.
-
This discussion was modified 5 years, 10 months ago by
Log In to reply.
Popular Salesforce Blogs
OAuth 2.0 Device Authorization Flow in Salesforce
For input-restricted devices that connect to the Internet, instead of authenticating the user directly, the device prompts the user to go to a link on…
Salesforce Customer 360: A Comprehensive Overview & Advantages
Salesforce recently introduced Customer 360, a groundbreaking technology that provides companies with a unified, comprehensive view of their customers across all touchpoints in the rapidly…
Custom Notification Using Apex | Salesforce Developer Guide
Custom Notification Custom notification may be a made-to-order notification within Salesforce org. We are able to use this feature to send notifications once any vital…
Popular Salesforce Videos
Field Level Security In Salesforce
Field-level security is a setting that lets Salesforce admins define user restrictions as to who can access specific org data. The setting lets the admin…
Salesforce JavaScript Developer 1 Certification Series
Hi Everyone, SFDC Panther has started the Salesforce JavaScript Certification series and this is the first session. What you will learn: Variables Data Types Operators…
Dreamforce 2021 Main Keynote - Welcome to the Trusted Enterprise | Salesforce
Today, every business has to transform to become a Trusted Enterprise. Join Marc Benioff & special guests to learn how Customer 360 helps businesses of…
Popular Salesforce Infographics
How to Become a Salesforce Consultant?
Begin your Salesforce Consultant journey with Trailhead to learn about the modules offered by Salesforce to its users - admin, business users and developers to…
Salesforce's Take On Sales vs Marketing [Infographic]
Let’s face it: you don’t need to be watching HBO’s acclaimed series Game of Thrones to see a rivalry like the Starks and Lannisters. A…
How To Upgrade Your Business With Salesforce?
Salesforce has been stretching the possibilities of business growth right from its inception in 1999. Its fierce business model attracted people who eventually moved to…