why on submit client script doesn't work on delete,discuss,follow, unfollow button

samreenayesha
Tera Contributor

why on submit client script doesn't work on delete,discuss,follow, unfollow button

1 ACCEPTED SOLUTION

Satishkumar B
Giga Sage
Giga Sage

Hi @samreenayesha 

The "onSubmit" client script doesn’t work for buttons like Delete, Discuss, Follow, or Unfollow because these actions don't trigger the form submission process that client scripts are designed to handle. For these buttons, consider using UI Actions or server-side Business Rules to handle custom logic.

 

Happy Learning

…………………………………………..
Mark it helpful 👍and Accept Solution !! If this helps you to understand.

View solution in original post

2 REPLIES 2

Satishkumar B
Giga Sage
Giga Sage

Hi @samreenayesha 

The "onSubmit" client script doesn’t work for buttons like Delete, Discuss, Follow, or Unfollow because these actions don't trigger the form submission process that client scripts are designed to handle. For these buttons, consider using UI Actions or server-side Business Rules to handle custom logic.

 

Happy Learning

…………………………………………..
Mark it helpful 👍and Accept Solution !! If this helps you to understand.

Markus Kraus
Kilo Sage

The onsubmit client script will be only executed on action_name=sysverb_{insert|insert_and_stay|update|update_and_stay} UI Actions.

 

If you want a client script to be executed there you're unfortunately pretty limited.

E.g. you create a custom delete UI Action (with client = true) and override the ootb one. The Follow, Discuss and Unfollow buttons aren't real UI Actions afaik so you cannot do this there unfortunately.