-
Help writing my first apex trigger in Salesforce - I have a simple use case in mind
Hello World!
I have a use case that requires a trigger and it sounds about as simple as it gets. We have an external application called BrightTALK integrated with our Salesforce org. Trouble is, we use State and Country Picklists and BrightTALK tries to push Leads into our Salesforce org with Country names that do not match the countries in our Salesforce org. As far as I know, there are two ways to tackle this issue. 1) Change the list of Countries in our Salesforce org. 2) Write a before trigger, which, if I understand correctly, could change a Country value like "China (Hong Kong)" into "China", which our org would then accept because the value matches a value in our State and Country Picklists setup.I have never written a trigger before, and I took one programming class 10 years ago. Does anyone have any recommended places to start, sample code to look at, reference material to refer me to where I can see the methods available to me in an before trigger and learn some syntax? Any help is much appreciated.
Log In to reply.
Popular Salesforce Blogs
Intriguing Features and Channels on Salesforce+
Earlier this year Salesforce introduced Salesforce+ that includes Live experiences, original series, podcasts, and other content that are all part of Salesforce+. Salesforce+ will illuminate…
Starting your career in Tech? Here are the know-hows of being a Salesforce Developer
With increasing technological innovation and the industry shift towards high paced and reliable software solutions, sales force development is one of the hottest trends as…
Salesforce Telephony and VoIP Integration: A Beginner’s Guide
You’re likely using Salesforce’s CRM to manage your communications with leads and customers online—but not all communication occurs through digital methods. If your sales reps…
Popular Salesforce Videos
Get the Most Out of Your Digital Adoption Efforts On Your Salesforce Community with GuideIn
Navigating online communities can be tricky. GuideIn is a Salesforce-native, lightning-ready product from the house of Grazitti that enables you to maximize digital adoption in…
Salesforce Lightning User Tips and Tricks Spring 2023
SalesPath Corporation has created a video explaining tips and tricks that every Salesforce user will find helpful in order to increase productivity. This video also…
What is Salesforce | Salesforce Training Videos For Beginners | Salesforce Tutorial
This Salesforce Training Video will help you an introduction to Salesforce Administrator and Platform App Builder Certification Training course offered by Simplilearn. By end of…
Popular Salesforce Infographics
Best Salesforce1 SMS Mobile App - 360 SMS App
360 SMS App is a One-stop texting solution platform for almost all kinds of industries including Healthcare, Hospitality, Education, etc. It can be your saviour…
How to Select A Cerified Salesforce Administrator?
Once you implement Salesforce, one of the most important ways to stay successful is to designate an incredible Salesforce Administrator. Easier said than done, right?…
What is Salesforce Architecture?
Have you ever wondered that what is so special about Salesforce? How does it manage to accomplish so much in such a less time? Well,…