Thank you so much Sir, i have been having a hard time understanding triggers and now i understand why i write each line it is very useful. there are many youtube channels when scenarios gets tougher then they don't explain why they wrote certain lines and for beginners its really stressful. thank you for the effort you have put in Sir. Thank you.
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; } } } } } ------
Thank you so much Sir, i have been having a hard time understanding triggers and now i understand why i write each line it is very useful. there are many youtube channels when scenarios gets tougher then they don't explain why they wrote certain lines and for beginners its really stressful. thank you for the effort you have put in Sir. Thank you.
you explain very well but why did you not create a separate class for that trigger?
Thank you bro, I've been struggling with Apex and triggers before watching your videos
Thanks ❤️
Videos are on point! Keep doing the good work!!❤
Thank you so much 😁
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..?
Super neat and clean
Hi bro, I have seen plenty of videos regarding trigger, but you nailed it bro, really thanks for your teaching bro.
Hi just wanted to know do u need null check
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;
}
}
}
}
}
------
Well explanation with scenarios
Thank you Harsh
Very well explained keep it up brother 👍
Thank you brother
Great explanation 👍
Glad it was helpful
Well Explained 👍
Thank you so much
pls upload the codes