-
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 6 years, 9 months ago by
Manjunatha.
-
This discussion was modified 6 years, 9 months ago by
Forcetalks.
-
This discussion was modified 6 years, 9 months ago by
Forcetalks.
-
This discussion was modified 6 years, 9 months ago by
Log In to reply.
Popular Salesforce Blogs
Optimization of Salesforce Org - Everything You Need to Know
In this blog we’ll learn about Optimization, why is it necessary, how can we optimize apex class, the highest execution duration of an apex class,…
How to Call Server-Side Apex Controller Action from Client-Side Controller in Lightning Component?
Server-Side Controller method can be invoked by the client-side controller by using the value provider of c. Client-side action can also be invoked by using…
Managed and Unmanaged packages in Salesforce in 2023 | All You Need to Know
What are the various types of packages in Salesforce? Let's understand! Unmanaged Package Think of it as a beautifully wrapped gift box that you can…
Popular Salesforce Videos
Salesforce Winter 21 Release - Sneak Peek
The Winter ’21 release delivers innovations across the Salesforce Customer 360 platform to help connect you to your customers, from anywhere. Fancy table updates, live…
APIs and Integration for the Salesforce Platform
Watch this session to learn how you can integrate with the Salesforce Platform. We'll demonstrate features, APIs, and techniques for integrating with Salesforce Core, Heroku,…
Apex Design Patterns: The Singleton Pattern in Salesforce
The Singleton Pattern One Private variable of the class itself will hold the instance of the complete class so that we can access all the…
Popular Salesforce Infographics
Future of Salesforce CPQ
Salesforce CPQ is a highly dependable tool that provides an accurate pricing strategy by configuring, pricing, and quoting the products of each company based on…
Salesforce Operations/Demographics
Salesforce, the world’s No. 1 CRM Company, has significantly changed the way how business software is delivered and used. Salesforce has found the perfect way…
How to Choose the Right Salesforce Partner | Infographic
Choosing the right partner is a key factor that can make or break the success of your project. Salesforce is a powerful CRM platform, which…