Dynamic blocks in custom notification

I facing one problem. I am using dynamic blocks in custom notification. I have created a back button in this notification. When back button is pressed i am removing all dynamic blocks so that when next time user comes he will not face with the problem of unique id on dynamic blocks. But when the user press instead of this back button presses the mobile back button, the notification is disappeared but the dynamic blocks are not removed which is giving the error of unique id when next time he is coming to notification. How to handle this. I have tried to place the removing dynamic component code on screen.backpress but it is not working. Is there any option except refreshing the screen because it will take time.

In such cases , why don’t you delete the dynamic compounds when the screen intitalise. Use if block, if the length of the list is greater than zero call dynamic compound to dele by id

I dont want the screen to initialize as the dynamic blocks are more and it is taking time. Except screen initialize is there any other option. Everything is on same screen

The issue is I cannot put in screen. initialize as this notification is taking data from the screen after user input using tinydb. If I put in screen.initiaze then the input values are old

Show how did you create dynamic procedure. Unique ID error will appear not because of back button, because of dynamic creation with diff id value

got it solved by using component remove the dynamic component block

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.