Duplicate task created

Mani60
Tera Contributor

Hi All,
I have query on duplicate task sc_task ,
In RITM when approval approved the form at that time sc_task should be created and i'm able to create those task  but in my case duplicate task are creating with different task number.
I'm written run script to create a task
please find the attached run script:

if (workflow.scratchpad.contact_center_number == 'Existing Number')
{
var nice = new GlideRecord('sc_task');
nice.initialize();
nice.short_description='Please reassign the Existing Contact center No. to the user.';
nice.request_item=current.sys_id;
nice.priority=3;
nice.assignment_group ='da2c3d88c3730550ba66783ce89131f6';// Network
nice.insert();

}

Please find the below snapshot:

Mani60_0-1692185702321.png

so could you please help me on this to get the proper solution.

Thanks,

 

2 REPLIES 2

Hemant Goldar
Mega Sage
Mega Sage

Hi @Mani60 ,

 

The number field is a unique key in ServiceNow. Thus it cannot be duplicated and not best practice to have a 2 task with similar task numbers.

 

I hope this helps!

 

Regards,

Hemant 

**Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.**

@Hemant Goldar thanks for Reply,

 

 But in my case the sc_task numbers are different but the short_description are same so can you help me to fix it