New Catalog Task State

Tracey Wilmot
Tera Contributor

Hi all, 

I hope you can help.  I feel like I should know this but I can't work it out!

I need to create a new Catalog Task state "On Hold".  However, this should only apply to one particular Request Item.

 

TraceyWilmot_0-1684339857479.png

Can anyone help?

Thanks so much

Tracey

4 REPLIES 4

Devender Kumar
Tera Guru
Tera Guru

Hi @Tracey Wilmot 

 

You can create a new state "on hold" and make it available on the SCTASK using UI Policy where you can mention in condition "Item is 'Your item name'" just an idea worth try it.

 

DevenderKumar_0-1684342019358.png

 

 

Please make sure if this works for you to hit a correct or helpful.

 

Regards

Devender

Prince Arora
Tera Sage
Tera Sage

@Tracey Wilmot ,

 

You can achieve this using UI policy/ Client script, please refer the below screenshots:

 

PrinceArora_0-1684342703918.png

PrinceArora_1-1684342730891.png

 

Script:

 

g_form.addOption('state',"On Hold","On Hold",3);

Output:

PrinceArora_2-1684342827825.png

 

 

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact.

 

Manmohan K
Tera Sage

Hi @Tracey Wilmot ,

 

Creating a new state for only one request item is not exactly a best practice. Please consult with the technical team and stakeholders and try to come up with a work around for it. For instance you can add a tag to the catalog task which is to be put on hold state.

Riya Verma
Kilo Sage
Kilo Sage

HI @Tracey Wilmot ,
I trust you are doing fine.

  1. Firstly, navigate to the Service Catalog module in ServiceNow.
  2. Open the relevant Request Item for which you want to create the "On Hold" state.
  3. In the Request Item form, locate the "Task" related list. This list displays the associated Catalog Tasks for the Request Item.
  4. Click on the "New" button in the related list to create a new Catalog Task.
  5. In the Catalog Task form, you will find a field called "State." This field represents the current state of the Catalog Task.
  6. To add a new state, such as "On Hold," you need to modify the list of available states. To do this, follow these steps:

// Navigate to the Dictionary entry for the Catalog Task table
// and find the field definition for the 'state' field.

// Once you have located the field definition, add the new state ('On Hold') to the list of available choices.
// Update the 'choice' attribute of the field definition to include the new state:
// <choice value="3" translation="On Hold">4</choice>

// Save the changes to the field definition.

// Now, when you create a new Catalog Task for the specific Request Item, you can set the state to 'On Hold'.

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