Комментарии:
@sanjay Gupta Thanks you sir ❤🎉 but aap agar thoda Hindi language used krke samjhauge to aur better samjhega 😊😅
ОтветитьIt's complicated to understand
ОтветитьThank you for creating this useful video. For the AfterDelete use case, I believe we can use Aggregate Queries to simplify the code further.
ОтветитьSir, pls remove this video lot of confusion in this scenario. U could have done a lot better than this explanation
ОтветитьI am not understand After delete event
Ответить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?
ОтветитьIt's difficult to understand this after delete scenario, can you please to explain in better way
Ответитьbefore doing this trigger ,,can u tell what n all field should i create on particular object,,,like datamodel....
Ответить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?
Ответить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.
Ответить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;
}
How to delete child record on deletion of parent record?
ОтветитьHow to create left employee count field
Ответитьdifficult to understand after delete with this complicated scenario. can you please make it easy for us?
Ответитьdifficult to understand
ОтветитьVery helpful it was. Thank you.
ОтветитьThanks
Ответить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?
Ответить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.
ОтветитьBro your after delete code is bit complicate.. you can make it in easier way.
Ответить@Sanjay Gupta Sir explain After delete portion in a better way
ОтветитьVery useful Trigger playlist. The explanation is clear and easy to understand. Thank you!
Ответитьthanks i did it but ur explaination is good
Ответить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.
ОтветитьAt line 45 I'm getting error that illegal assignment from decimal to string... Can anyone help me with that
ОтветитьAfter Delete Explaination is not up to the mark
ОтветитьVry useful..thanks
Ответитьthere is relation btw Account and employee and for which field??
Ответить