How to auto populate due date to +3 days from current date in case form

Bala13
Kilo Guru

Hi,

I have a requirement to auto populate due date field +3 business days with current date.

Can anyone help me to fix the issue?

I tried to add before insert BR but its not working as expected.

var sd = new GlideDateTime(gs.nowDateTime());
sd.addDays(3);

current.due_date=sd;

1 ACCEPTED SOLUTION

If you want to show date after 3 days when user open new form (to create new record ) then you can set default value at dictionary level by overriding dictionary of due_date field.

find_real_file.png

 

 

Thanks,

Anil Lande

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

7 REPLIES 7

Ujjawal Vishnoi
Mega Sage
Mega Sage

Try below Business rule.

var sd = new GlideDateTime();
sd.addDays(3);
current.due_date=sd;

 

Hope it helps.

Its not working

Girish12
Kilo Sage

Hi Bala,

Try with below code once

var sd = new GlideDateTime();
sd.addDays(3);

current.due_date=sd;

Its not working