How to set due date in Ask for approval action in flow designer

mickydash2001
Tera Contributor

Can anyone suggest how to set due date for ask for approval in flow designer without auto-approve auto-reject or auto-cancel? I tried with adding calculate catalog task due date action but getting one error

 

 

 

class com.glide.glideobject.GlideDateTime cannot be cast to class java.lang.String (com.glide.glideobject.GlideDateTime is in unnamed module of loader com.snc.orbit.container.tomcat8.Tomcat8$OrbitTomcat8ClassLoader @ae40e9; java.lang.String is in module java.base of loader 'bootstrap')

 

 
8 REPLIES 8

GerardAlleB_0-1738299016582.png


Can you try this?

sushantmalsure
Mega Sage
Mega Sage

Its type cast error. Share screenshot for your logic to help you better.

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

Hi @sushantmalsure 

This is the script I wrote 

 

var gdt = new GlideDateTime();

gdt.addDaysUTC(2);

return gdt;

 

I tried with this too

 

var gdt = new GlideDateTime();
var time=gdt.toString();
time=time.split(' ');

gdt.addDaysUTC(2);
var gdt1=new GlideDateTime(gdt.getDate()+' '+time[1]);
return gdt1;

 

 

Brian Sorensen
Giga Guru

We did a flow for approvals that checks if its approved or not, then after X amount of days auto rejects

It sends a reminder to the approver, then checks, then sends another reminder, then closes its out.

BrianSorensen_0-1682443282159.png