-
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 4 years, 2 months ago by Manjunatha.
- This discussion was modified 4 years, 2 months ago by Forcetalks.
- This discussion was modified 4 years, 2 months ago by Forcetalks.
Log In to reply.
Popular Salesforce Blogs
Triggers in Salesforce - Learn All You Need to Know
What is Apex Trigger? Apex Triggers are used to refer to triggers in Salesforce. These are different and are accessible for particular tasks such as…
Imported for Person Accounts in Salesforce - All You Need To Know
Required Editions Information Import Wizard accessible in both Salesforce Classic and Lightning Experience. Information Import Wizard accessible all told Editions other than Database.com. Individual records…
Popular Salesforce Videos
Can Salesforce Developers and Consultants Choose Architect Track?
A Salesforce Consultant works to help companies meet their missions by driving client-specific implementation as well as ongoing system improvements on the Salesforce platform. The…
Introduction to Salesforce CPQ | EP1
Session 1: Introduction to Salesforce CPQ: The video provides an introduction to the general quoting challenge many Customers face, and how Salesforce CPQ with its…
Popular Salesforce Infographics
Sales trends and performance: ANZ versus global
Technology is pushing customer expectations to all-time highs and sales organisations into uncharted territory. Organisations worldwide are coping differently as sales trends change operations. Sales…
Salesforce for Sales Development Success
Customer Relationship Management tools like Salesforce help sales teams juggle the hundreds of leads, tasks, and activities they need to complete each day. Modern sales is often…
How IT Leaders Can Build Employee Advocacy | Salesforce Infographic
We created the APAC Employee Engagement report based on this research, to provide key insights that are critical to IT and people leaders now and…