- 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-27-2015 12:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2015 12:49 PM
On second thought, you want the assignment group and priority to always be the problem's assignment group and priority? Or just on create of a new record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2015 01:22 PM
I am a little confused on why we are taking the approach of using a BR to correct a ticket which was created incorrectly...
i am assuming a UI action was used to create the problem tasks.. why not correct that ui action to update the fields on the task when it is created instead of building a new br?
if you do want to use a br... like a previous poster mentioned you need to make sure it is ONLY on insert.. or each time the record is saved it will over write the current fields with the ones from the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2015 01:27 PM
Well, if you use the New button in the related list, you don't have the choice to update the fields. I would set it as before insert, set the fields and then allow them to be changed manually by the user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2015 01:35 PM
i will buy that answer.. although personally we disable the add new button on the list view to prevent exactly that.. the only way you should be creating a problem task is from the UI/script/workflow