How to AutoPopulate the Change Task fields namely (assignment group, Planned start/end Date).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2023 06:45 PM
Hello,
So I'm trying to Auto populate the Change Task fields namely (assignment group, Planned start/end Date). right after clicking the Implement button (please see screenshot)on the Change Request form.
so that this change task fields will get the same values from the same fields of change request form.
I did try to create a business rule but I'm only able to auto populate it when I hit the new button from the change task directly.
Appreciate any help, Thankyou in advance 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 12:13 AM
Hello @jabaya
Can you please share the XML file of the UI actions.
Am assuming it has been customized.
Are you using any script include within the UI action?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 12:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 06:28 AM
Hello,
Update the code in OOB UI Action - Implement like below.
function moveToImplement() {
g_form.setValue("state", "-1");
gsftSubmit(null, g_form.getFormElement(), "state_model_move_to_implement");
}
if (typeof window == 'undefined')
setRedirect();
function setRedirect() {
var grctask=new GlideRecord('change_task');
grctask.addQuery('change_request',current.sys_id);
grctask.query();
while(grctask.next())
{
grctask.setValue('assignment_group',current.assignment_group);
grctask.setValue('planned_start_date',current.planned_start_date);
grctask.update();
}
current.update();
action.setRedirectURL(current);
}
Please mark my answer as helpful/correct if it helps you.
Regards,
Namrata
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 07:36 AM
Hello Good day,
Thankyou so much for the help, I did try the to implement the script above, after that i also tried to modify it a bit but to no avail both trials did not work. ( please see screenshots ).
do you still have any possible idea why it did not work ?