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

8 Advantages of Using Salesforce For Small Businesses and Startups
Salesforce is one of the most powerful cloud-based CRM platforms. A robust yet efficient CRM system – one that meets all the field-specific needs of…

What are Quote Line Items in Salesforce
What are the benefits of using quotes? When you have an opportunity, people want to know what choices you have. “Yeah, I'm interested in this,”…

10 Reasons You Need a Salesforce Support and Maintenance Partner in 2021
The secret behind the selection of Salesforce maintenance for supervising the marketing processes lies since it assists in improving the business continuously and manages the customer's contentment efficiently. Support…
Popular Salesforce Videos
Salesforce Admin Training: How to add custom fields in salesforce ?
Salesforce Custom fields :- Up to now we have created custom app, custom object and now we are going to create Salesforce custom fields. When…
Flow to Redirect User to Newly Created Record - Salesforce Flow
Scenario: Shubham is looking for functionality in Salesforce Flow Where after creating a record it redirects to that particular record detail page. Solution A: Create…
Getting Turn by Turn Directions Between Scheduled Events | Salesforce Maps Mobile
Watch this video to learn how to get turn-by-turn directions between scheduled events in Salesforce Maps Mobile. 00:00 - Introduction 00:19 - Access your Schedule…
Popular Salesforce Infographics

6 Signs Your Business Needs a Salesforce CRM
When people talk about Customer Relationship Management (CRM), they are usually referring to a system that helps with contact management, sales management, productivity, and more.…

Which Salesforce Certification is Right for You?
This informative infographic will help readers to decide which Salesforce certification is right choice for their Salesforce career.

Infographic: State of Service 2019
Did you know that 64% of people think that customer experience is more important than price in their choice of brand? The new trends in customer service…