Apex Triggers - 2 (Trigger Context Variables with Scenario)
ฝัง
- เผยแพร่เมื่อ 13 ธ.ค. 2022
- 💻 Join the Titan Community : Discover Exclusive Insights on LinkedIn / mycompany
💻 Explore the Power of Titan : Visit Our Official Website Now 🔗 titandxp.com/ - วิทยาศาสตร์และเทคโนโลยี
Hi bro, I have seen plenty of videos regarding trigger, but you nailed it bro, really thanks for your teaching bro.
Videos are on point! Keep doing the good work!!❤
Thank you so much 😁
Super neat and clean
Thank you bro, I've been struggling with Apex and triggers before watching your videos
Thanks ❤️
Well explanation with scenarios
Thank you Harsh
Hi just wanted to know do u need null check
Great explanation 👍
Glad it was helpful
Well Explained 👍
Thank you so much
Very well explained keep it up brother 👍
Thank you brother
if we only have isbefore in our trigger , then i dont think we need to check for "if(!trigger.new.isempty())" ,please correct me if iam wrong..?
Hi Badal,
Is this logic also same or different because its working same as your use case
------
trigger AccountTrigger on Account (before insert) {
if (trigger.isBefore && trigger.isInsert){
// copy Billing address fields to mailing address fields
if (!trigger.new.isEmpty()){
for (Account acc : Trigger.new) {
if (acc.BillingStreet != null || acc.BillingCity != null || acc.BillingState != null || acc.BillingPostalCode != null || acc.BillingCountry != null){
acc.ShippingStreet = acc.BillingStreet;
acc.ShippingCity = acc.BillingCity;
acc.ShippingState = acc.BillingState;
acc.ShippingPostalCode = acc.BillingPostalCode;
acc.ShippingCountry = acc.BillingCountry;
}
}
}
}
}
------
pls upload the codes