function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
TaruniTaruni 

when parent question is deleted then i need to delete all the sub level questions in a related list

Hi,


In a related list, I will have few questions generated.Based on the asswer provided to these questions either, I will add or delete certain dependent questions to the same related list.

This is done through trigger.

but my problem is that I am able to delete only single level
but I need to delete multiple levels as below:

eg: Q1-->yes
                 NO--->add Q2---->yes
                                                   NO----->add Q3

when I select Q1 asnwer as "no", question Q2 will be added then I will select Q2 answer as "No" then Q3 will be added but when i change the Q1 answer to "Yes" then I need to delete both Q2 and Q3 questions.

Basically, when parent question is deleted then i need to delete all the sub level questions.

any help will be appreciated.

Kamatchi Devi SargunanathanKamatchi Devi Sargunanathan

What is the relationship between these questions?

 

Which one is a child and which on is parent. Can you please explian in detail.