Using javascript to set up the default value of a field as the same as the value of that field in the parent task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2018 09:41 PM
Hi, i want the default value of a field in a child task to be the same as the current value of that field in the parent task(so for example, in a change task for the field business_services, i want the default to be the parent ticket value of that field (in this case it would be the business_services field in the change request form)
Searching around it looks like it should be like this:
javascript:current.parent.business_service.getDisplayValue();
but its not working.
I have done it with client scripts sucessfully, but i want to try it with default value now.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2018 09:49 PM
You might try this...
javascript:current.parent.business_service;
If you're setting a reference field you want to use the sys_id, not the display value. If you're still having problems, it's likely because 'current.parent' may not exist before the record is created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2018 11:35 AM
Hi, i try that but to no avail

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2018 11:51 AM
try
javascript:current.change_request.business_service;
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2018 11:52 AM
Also this should be added as a default to a dictionary override record, so that it doesn't impact other tables
Please mark this response as correct or helpful if it assisted you with your question.