Apex Triggers - 8 (Trigger Interview Question)

Apex Triggers - 8 (Trigger Interview Question)

SFDC Ninja

1 год назад

15,311 Просмотров

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


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

@BalajiBasanolla-jj6em
@BalajiBasanolla-jj6em - 20.11.2023 17:17

while inserting record getting this error OpportunityTrigger: execution of AfterInsert caused by: System.NullPointerException: Attempt to de-reference a null object Class.OpportunityTriggerHandler.sumofoppamountmethod: line 39, column 1 Trigger.OpportunityTrigger: line 5, column 1

Ответить
@BalajiBasanolla-jj6em
@BalajiBasanolla-jj6em - 20.11.2023 16:51

when i tried it hitting this error OpportunityTrigger: execution of AfterInsert caused by: System.NullPointerException: Attempt to de-reference a null object

Ответить
@shariquekalam7681
@shariquekalam7681 - 02.10.2023 15:56

Hi Badal , In the past few weeks I have got immense confidence on Apex Triggers , Thank you for all your efforts.....
One thing I wanted to add is that we can have a check like only if Opportunity Amount field is updated then the whole logic should be applied else I guess there is no need to update the related accounts ?
Please correct me if I am wrong
Thank You

Ответить
@ankurpandey92
@ankurpandey92 - 01.09.2023 18:29

Is we change parent of two opportunities, the total amount field on the account updates only one of the opportunity amounts. Why is it so ?

Ответить
@arpitajiddewar6505
@arpitajiddewar6505 - 01.09.2023 11:34

Hii why we used totalAm field it doe not exist in opportunity obj

Ответить
@kimpangilinan8954
@kimpangilinan8954 - 22.06.2023 16:31

Hi! How do I filter it to capture only Closed Won Opportunities? Thank you.

Ответить
@mahaboobbasha3435
@mahaboobbasha3435 - 12.06.2023 12:44

Hi
I have scenario where total amount is not updating in the account field change on opportunity.
If account has only 1 opportunity and if parent account gets change, then total amount is not updating to 0.
Note: if i delete that opportunity, then total amount is updating to 0.

Ответить
@abhishekshudhalwar5526
@abhishekshudhalwar5526 - 02.06.2023 08:02

Brother if we remove line 58, then I guess line 68 to 77 will not be required?, please let me know

Ответить
@animatedvinesofmk2774
@animatedvinesofmk2774 - 28.05.2023 10:54

Bro you not doing as per best practice where is the trigger helper method

Ответить
@EmadKhan777
@EmadKhan777 - 21.05.2023 10:00

why you are not using handler class. is there any specific reason

Ответить
@YashSharm884
@YashSharm884 - 09.05.2023 15:07

Hii Badal, you can use that same technique to count number of contact instead of using inner query.

Ответить
@varikutivenkatesh6680
@varikutivenkatesh6680 - 25.04.2023 08:14

Thank you so much bro ...

Ответить
@bhai9458
@bhai9458 - 16.04.2023 13:24

undelete is not working please give the code link in the description

Ответить
@nitinnainwal
@nitinnainwal - 09.01.2023 09:13

Thank you brother.

Ответить