set catalog task to closed complete from workflow

Divya V
Tera Contributor

The requirement is to close the catalog task to close complete based on the end field(catalog form field)in the task variables. 

I had set a timer in the workflow from current date to end date and on end date close the task as closed complete and the RITM should be closed complete.

After the timer I have used Run script to set the catalog task state to complete but it is setting the catalog task to closed incomplete(deviation from the expected behavior)  and RITM is closed complete(expected behavior) 

Below is the workflow

DivyaV_0-1694070534352.png

Below is the Run script code

DivyaV_1-1694070585462.png

Could anyone please help me on this.

 

Thank you,

Divya 

6 REPLIES 6

Shruti
Mega Sage
Mega Sage

Hi,

current.number.getDisplayValue() should be replaced with current.number in the run script

 

Also, Please share screenshot of the complete flow

Hi Shruti,

 

Task is still closed as "closed Incomplete" through workflow

anshul_goyal
Kilo Sage

Hello @Divya V 

Use current.getValue("number"); or current.number; instead of current.number.getDisplayValue();

And also share the screenshot of the Complete workflow activity.

Thanks,
Anshul

Hi Anshul,

 

The task is still closed as "Closed Incomplete" from the workflow.