Certified Platform Developer II Exam QuestionsBrowse all questions from this exam

Certified Platform Developer II Exam - Question 165


A developer creates an application event that has triggered an infinite loop.

What may have caused this problem?

Show Answer
Correct Answer: AD

An infinite loop in the context of application events is often caused by the event handler triggering another event repeatedly. If the event handler calls a trigger, it can continuously re-fire the event, leading to an infinite loop. This creates a cycle where the event never stops firing, consuming resources and potentially causing the application to crash.

Discussion

3 comments
Sign in to comment
RegNavOption: D
May 19, 2023

The renderer of an Aura component should not fire any event. Doing so can cause an infinite rendering loop. Instead, the init handler can be used to run a controller action after construction of the component but before rendering.

Yas010101Option: A
Jan 11, 2024

The event handler calls a trigger

corpexOption: D
Apr 24, 2024

From this url seems to be D: "Don't Fire an Event in a Renderer Firing an event in a renderer can cause an infinite rendering loop." https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_anti_patterns.htm