1

I want to detect when a certain field has been changed in the browser, and run some code to clean up the text in that field so the user can see the clean version before saving the changes to the record.

All I can find is trigger functionality for when the actual record in the database is changing, but I want to run code when the DOM changes on a standard object's page.

1

If it is a visualforce page you can achieve it using client side javascript/jQuery. Onchange you can call your script and do cleanup or modify value.

If it is not a visualforce page you will have to override with a visualforce page so that you can execute client side javascript.

| improve this answer | |
  • How can I override it with a VF page that is identical to the original (except that it is a VF page)? – Neo May 12 '15 at 20:43
1

I think you'll need to create a Visualforce page with Javascript to replace the standard object's edit page.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.