Get Started with Apex Triggers Salesforce Trailhead Challenge
ฝัง
- เผยแพร่เมื่อ 7 ก.ย. 2024
- link of the code document is below and in the first comment also
docs.google.com/document/d/1hzXS3wa90YmgHKjR8gILpuzsqjz0BPk7hYNN9Fu2Epg/edit?usp=sharing
Trailhead link is below
trailhead.sale...
this video is about Get Started with Apex Triggers Salesforce Trailhead Challenge
Get Started with Apex Triggers
Learning Objectives
After completing this unit, you'll be able to:
Write a trigger for a Salesforce object.
Use trigger context variables.
Call a class method from a trigger.
Use the sObject addError() method in a trigger to restrict save operations.
Create an Apex trigger
Create an Apex trigger that sets an account’s Shipping Postal Code to match the Billing Postal Code if the Match Billing Address option is selected. Fire the trigger before inserting an account or updating an account.
Pre-Work:
Add a checkbox field to the Account object:
Field Label: Match Billing Address
Field Name: Match_Billing_Address
Note: The resulting API Name should be Match_Billing_Address__c.
Create an Apex trigger:
Name: AccountAddressTrigger
Object: Account
Events: before insert and before update
Condition: Match Billing Address is true
Operation: set the Shipping Postal Code to match the Billing Postal Code
Thank you so much sir🙏
Thank you sir it was so helpful
Sir i am getting an error in custom field. It is showing field already exists.then what should I do
it means your field is already exited refresh your project playground then see in the custom fields of the related module if the field is ready created and you want to change that field first delete that field and recreate it
Thank you sir
Thanks a lot 👍
We updated and account that had match billing address c set to true. we expected to triggered to fire but it didn't make sure the trigger files if match billing address C is tru
Yehi btata h challenge check krne pe
Thanks
@@manokeerthi4870 well come
Tnqq😊
Useful
Glad to hear that
Thankyou ❤
You're welcome 😊
Sir it is showing again it has duplicate and unknown values while submitting the triggers
@@kramsivaraj3637 try this to an other playground repeat this process matching with the video
Ok
How to open developer console
Open you org , then click setting icon, in the open menu there will be an option of developer console
😂😂