04 Before Delete Vs After Delete | Trigger in Salesforce | Salesforce Training | Learn Salesforce

04 Before Delete Vs After Delete | Trigger in Salesforce | Salesforce Training | Learn Salesforce

Sanjay Gupta Tech School

3 года назад

34,112 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@nikhilatram5243
@nikhilatram5243 - 07.11.2023 22:16

@sanjay Gupta Thanks you sir ❤🎉 but aap agar thoda Hindi language used krke samjhauge to aur better samjhega 😊😅

Ответить
@omarsail131
@omarsail131 - 30.10.2023 17:14

It's complicated to understand

Ответить
@15sirisha
@15sirisha - 24.07.2023 18:36

Thank you for creating this useful video. For the AfterDelete use case, I believe we can use Aggregate Queries to simplify the code further.

Ответить
@mchan9424
@mchan9424 - 27.05.2023 05:24

Sir, pls remove this video lot of confusion in this scenario. U could have done a lot better than this explanation

Ответить
@Trailhead_Champion
@Trailhead_Champion - 24.05.2023 10:14

I am not understand After delete event

Ответить
@suryanshjain431
@suryanshjain431 - 21.05.2023 12:02

Getting an error while performing after delete "There's a problem saving this record. You might not have permission to edit it, or it might have been deleted or archived. Contact your administrator for help".Any Idea How to resolve it?

Ответить
@VishalPatil-hw8pj
@VishalPatil-hw8pj - 19.01.2023 09:26

It's difficult to understand this after delete scenario, can you please to explain in better way

Ответить
@sarveshnaik1762
@sarveshnaik1762 - 07.12.2022 12:14

before doing this trigger ,,can u tell what n all field should i create on particular object,,,like datamodel....

Ответить
@subbukalyanam
@subbukalyanam - 18.10.2022 14:58

Hi Sanjay I wrote entire code to update left employee records, code is not showing any error but left employee record not updated. what to do?

Ответить
@subbukalyanam
@subbukalyanam - 13.10.2022 06:30

HI Sanjay, It is hard to understand when you already wrote a trigger and explaining from it and code is also very lengthy way not understandable who are learning triggers initially.

Ответить
@prasadshinde5563
@prasadshinde5563 - 26.09.2022 09:52

I have created it for after delete and working.
i found it easy than yours.
is it good to use please check ?

Trigger
trigger adcontact on Contact (after delete)
{
triggerhandler.afterdelete(trigger.old);
}

Method
public static void afterdelete(list<contact> c1)
{
set<id> s1 = new set<id>();
list<contact> c2 = new list<contact>();
for(contact c3 : c1)
{
if(c3.AccountId != null)
{
s1.add(c3.accountid);
c2.add(c3);
}
}
list<account> a1 = [select left_contact__c from account where id in :s1];
for(account a2 : a1)
{
for(contact c4 : c2)
{
if(a2.id==c4.accountid)
{
if(a2.left_contact__c==null)
{
a2.left_contact__c = 0;
}
a2.left_contact__c = a2.left_contact__c + 1;

}
}
}
update a1;
}

Ответить
@naturelovers7718
@naturelovers7718 - 14.09.2022 15:17

How to delete child record on deletion of parent record?

Ответить
@mohdafaque456
@mohdafaque456 - 16.08.2022 00:43

How to create left employee count field

Ответить
@FahimKhan-zx2ks
@FahimKhan-zx2ks - 07.05.2022 08:20

difficult to understand after delete with this complicated scenario. can you please make it easy for us?

Ответить
@utkarshverma7614
@utkarshverma7614 - 17.04.2022 17:27

difficult to understand

Ответить
@mohankrishnabotu8284
@mohankrishnabotu8284 - 13.04.2022 18:28

Very helpful it was. Thank you.

Ответить
@aslambagwan6032
@aslambagwan6032 - 04.04.2022 11:20

Thanks

Ответить
@mohitdeshwal9957
@mohitdeshwal9957 - 24.03.2022 11:16

It gives me nullPointer exception error on line where you performed put method of map in else condition can anyone tell me why it giving this and how to resolve this?

Ответить
@aloknathshrivas3006
@aloknathshrivas3006 - 12.03.2022 02:52

Dear sanjay gupta i tried after delete but when im deleting employee im getting message like this There's a problem saving this record. You might not have permission to edit it, or it might have been deleted or archived. Contact your administrator for help.

Ответить
@shivareddymedhapati5373
@shivareddymedhapati5373 - 09.01.2022 20:10

Bro your after delete code is bit complicate.. you can make it in easier way.

Ответить
@sarthakgarg2880
@sarthakgarg2880 - 17.09.2021 07:48

@Sanjay Gupta Sir explain After delete portion in a better way

Ответить
@rimashah3396
@rimashah3396 - 21.06.2021 16:52

Very useful Trigger playlist. The explanation is clear and easy to understand. Thank you!

Ответить
@kumarmouthik2520
@kumarmouthik2520 - 08.06.2021 00:07

thanks i did it but ur explaination is good

Ответить
@kumarmouthik2520
@kumarmouthik2520 - 07.06.2021 18:59

Dear sanjay gupta i tried after delete but when im deleting employee im getting message like this There's a problem saving this record. You might not have permission to edit it, or it might have been deleted or archived. Contact your administrator for help.

Ответить
@visheshsharma7668
@visheshsharma7668 - 07.06.2021 10:21

At line 45 I'm getting error that illegal assignment from decimal to string... Can anyone help me with that

Ответить
@sai.kumarpogula3335
@sai.kumarpogula3335 - 15.05.2021 11:14

After Delete Explaination is not up to the mark

Ответить
@preetiray2133
@preetiray2133 - 01.04.2021 22:12

Vry useful..thanks

Ответить
@shivanigoswami2773
@shivanigoswami2773 - 08.02.2021 14:37

there is relation btw Account and employee and for which field??

Ответить