Create Task by UI Action

David278
Kilo Contributor

I am trying to create a task via a UI Action on the Change Request form.

The idea is that Change Manager can click on a UI action to quickly assign a task to resolver group with some pre-filled values like short description, description, priority, assignment group & assigned to.

The UI Action that doesn't show up on the change form to create a task.

 I know I must be missing something obvious in the UI action code, but I can't figure out what it is.

 

this is my code :

function createtask(){

gsftSubmit(null, g_form.getFormElement(), 'create_task');
}
if (typeof window == 'undefined')
serverUpdate();

function serverUpdate(){
var task = new GlideRecord('change_task');
task.initialize();
task.change_request = current.sys_id;
task.short_description = "SD";
task.description = "yes";
task.priority = "1";
task.assignment_group.sys_id = "c7115ecyec0i8056700a122a0f7901d02";
task.assigned_to = "";
task.insert();
action.setRedirectURL(current);

}

 
1 ACCEPTED SOLUTION

Pranay Tiwari
Kilo Guru

Actually your condition is not meet that's why it will not showing in your form.

remove the condition from UI Action and check it.

 

Mark correct or helpful if it helps you.

View solution in original post

9 REPLIES 9

Pranav Bhagat
Kilo Sage

Did you check the form button

 

Regards,

Pranav

Mark my Responses as Correct and Helpful if you find it relevant.

 

Pranay Tiwari
Kilo Guru

Hi,

 

Your UI Action is work perfectly if you change

task.assignment_group= "d625dccec0a8016700a222a0f7900d06";

and also check condition.

 

Mark correct or helpful if it helps you.

 

Warm Regards,

Pranay Tiwari

| www.DxSherpa.com |

I know there is little bit mistake but still it not work's

 

see my code

 

 

Pranav Bhagat
Kilo Sage

Did you check the 

 

 

Regards,

Pranav

Mark my Responses as Correct and Helpful if you find it relevant.