Learning Oldvalue - It returns an empty value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Problem Statement:
When oldValue is used in onChange client scripts, it always returns an empty value.
An example:
onChange client script depends on the Short description field. When the client script triggered, the oldValue is returning empty instead of what the user previously entered in the Short description field prior to saving the change.
Client Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
19 hours ago
Hi @PurviP
The old value refers to the value that was previously stored in the database. If you are working on a new record, the old value will always be empty until the record is saved. Once it is stored in the database, any subsequent time the client script is triggered, it will retrieve the last stored value from the database as the old value.
It will not display the data that the user just typed but hasn’t saved in the database.
Regards,
Siva