-
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, 12 months ago by
Manjunatha.
-
This discussion was modified 5 years, 11 months ago by
Forcetalks.
-
This discussion was modified 5 years, 11 months ago by
Forcetalks.
-
This discussion was modified 5 years, 12 months ago by
Log In to reply.
Popular Salesforce Blogs
How to Write a Test Class in Salesforce? The Salesforce Developer Guide
In any development, testing is a very important step as it tells us about how good the development has been done and for that we…
Major Benefits of Hiring a Salesforce Consultant
What is the Market Share of Salesforce? Salesforce's global market share and revenue continue to increase year after year. The company holds a market share…
Top Salesforce Trends to Watch Out in 2021
2020 year has been a challenging year for everyone no doubt. The pandemic, global lockdown, and economic crisis have affected everyone’s personal lives and the…
Popular Salesforce Videos
Work Your Opportunities and Manage Your Pipeline (Lightning Experience) | Salesforce
In this video, Salesforce Support demonstrates how to work with deals and manage your pipeline in the Salesforce Lightning Experience. With interactive features that help…
Add Intelligence to Any Salesforce App with Einstein Discovery
Bring intelligence in the context on any Force.com app thanks to the power of Einstein Data Discovery. Any Salesforce Admin or Developer can add in…
Dean ERP : Salesforce ERP for Manufacturing and Distribution
Discover how Dean ERP, powered by Salesforce, is transforming the manufacturing and distribution industry with advanced ERP solutions. From real-time inventory management to seamless order…
Popular Salesforce Infographics
4 Reasons To Offer An Exceptional Customer Service
When it comes to customer service, our friends at Salesforce have a few tips and tricks up their sleeve. We were thrilled to help them…
The Ultimate Dreamforce Parties 2019
Salesforce Dreamforce has it all. 2700+ sessions, workshops, hands-on demos, product launches, and whatnot. But everyone deserves breaks in between these gripping sessions, right? Dreamforce parties are a…
5 Security Habits That Help Your Salesforce Admin Career
As Salesforce Admins, you drive results and deliver business value every day. You automate processes and make them more efficient. You can also learn more…