- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2015 12:15 PM
I have created a client script to copy fields from "Problem Ticket" to "Problem Task Ticket", it didn't work. Can someone guide me through?
Table=Problem
Type=onLoad
function onLoad() {
//Type appropriate comment here, and begin script below
if(g_form.isNewRecord() && g_form.getValue('parent') != ''){
var prb = g_form.getReference('parent', setFields);
}
function setFields(prb){
g_form.setValue('assignment_group',prb.assignment_group);
g_form.setValue('priority',prb.priority);
}
}
Thanks.
Steven
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2015 10:52 AM
And then do javascript:parent.priority for an override on the priority.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2015 09:49 AM
hmm valid point you are right.. either an onload client script or display br will have to do it... with a condition of assignment group or priority is blank.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2015 09:50 AM
Actually Wait.. .we are going about this all wrong... why not set a default value!!
javascript: current.parent.assignment group and priority as the dictionary over ride default values on the form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2015 10:03 AM
Yep, Kam (Steven) Chow, that is exactly how you should do it. Set the default value to be what you want. It keeps the load on the server, but does not have to run every time you load the page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2015 10:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2015 10:43 AM
Just set the default value there to javascript: parent.assignment_group