Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Invoking a function after removeInstance

Level 2
Level 2


I have a small question regarding calling/invoking a javascript function after executing removingInstance.

I have a dynamic table that allows the user to remove/add as many rows as they want. If they decide to remove a row from the table, I need to call a javascript function.

If I place the script after removeInstance I always get an undefined error, and yet if I move that same script above the removeInstance, then there are no errors

But that's not what I'm trying to achieve.

Any help would be appreciated.



2 Replies
Level 10
Level 10

Hi MaThandos,

That seems to be the way it works, as soon as you delete the form object that contains the code you are executing it will stop.

Try moving your code to a function in a script object and calling that from your button.



Level 2
Level 2

Thanks for your reply Bruce, but I tried what you suggested and it didn't quite work for me. The whole purpose was to invoke the script immediately after removeInstace has been triggered.

I finally moved the script to form:ready event of the button and it works beautifully, just hoping that it won't break anything else further on.

THanks a million