Show custom sctask state in specific catalog item

Codi
Tera Contributor

Hi Everyone,

Is it possible to show the custom state for Sctask in specific Catalog item?

If yes how can I achieved it?

 

Thanks in Advance

5 REPLIES 5

Anurag Tripathi
Mega Patron
Mega Patron

Hey Codi,

 

What is the use case here?

State for sc_task (the one oin question and others too) moves manually or trhough Flow/buttons etc?

-Anurag

Hi Anurag,

the state of sc_task that can be changed manually

Codi_0-1719820150904.png

 

Codi
Tera Contributor

 

Basically there is a new custom State value that I need to implement but this is for specific Catalog item only and it will not appear to the other sc_task State field

Reason I asked how the state changes happen is, If it is not manual thenyou can make the state field read only. and add the new choice value. Easy Peasy.

 

However if state needs to be editable, then the best solution I can think of is, using an onload client script, on the SC_task you want to have this new state appear, add it manually. Something like below

if(g_form.getValue('state') != '<value of choice>') //this is done to ensure you dont add it twice
{
g_form.addOption('state', '<value of choice>' , 'Display Text of choice'); 
}

-Anurag