Skip to main content
Question

CLM: Send reminder that contract will expire in x days, where x = current date + defined # of business days


Forum|alt.badge.img+4

We want to Schedule Document Reminder for 100 days past current date. 

I created a Date variable called “ReminderDate” <%#Variable.ReminderDate%> in the workflow, and then used c# code that I found on the help site to calculate # days out past that date.  (For testing I used 1 as the number of days.)

var current = DateTime.Today;
var daysToAdd = 1;
for (var i = 0; i < daysToAdd; i++){
if(current.DayOfWeek != DayOfWeek.Friday){
current = current.AddDays(1);
} else{
current = current.AddDays(3);
}
}
return current;

 

However, I am getting an error message:  Couldn't update '1/1/1900 12:00:00 AM': Not a variable, and not an xml variable.  Since this creates the date as 1/1/1900, the Schedule Document Reminder task spits out an error - “Reminder can't be scheduled in the past.”.  

Can someone help out on this one?  

 

I tried similarly to calculate an Expiration Date but got the same error, so guessing that it is something in the c#.  

(Created the variable in the workflow - not stored as an attribute or anything like that)

3 replies

Pawan Gangwani
Rising Star
Forum|alt.badge.img+13

hello ​@newtoclm 

Welcome to the DocuSign Community!

As much as I understand you just need to add the 100 days in the current date to update the variable called “reminder date”.

I would suggest use the simple C# and create one variable to save the current date and use it.

DateTime.Parse(GetVariableValue("VariableName")).AddDays(90);

//Add 90 Days to a date

if you could not find out the current time. then you can use this c#.

System.DateTime.Now.ToString("MM/dd/yyyy hh:mm");

thanks!

 


Forum|alt.badge.img+4
  • Author
  • Conversation Starter
  • 14 replies
  • February 7, 2025

OK.  So found out that it was the way I chose the variable more than the code itself.  


Pawan Gangwani
Rising Star
Forum|alt.badge.img+13
newtoclm wrote:

OK.  So found out that it was the way I chose the variable more than the code itself.  

Yeah, but you will have to use the C# to achieve the requirement.