Being that CRM works with a few diffrerent languages, and its own context language; programming can sometimes be a little tricky
The following script uses:
eWare record object
eWare Query Object
Java DateScript and
SQL data updates…
I have posted this as it took hours to work out and hopefully it will help someone in the future….
record = eWare.FindRecord(“charaction”, “char_charactionid=”+UseId);
actiondate = new Date(record.item(‘char_actioneddate’));
sql = “update charaction set char_tobeactioned = DateAdd(d,90,’”+actiondate.getYear()+”/”+actiondate.getMonth()+”/”+(actiondate.getDate()+1)+ “‘) where char_order=5 and char_chartid=”+ chartid;
Query=eWare.CreateQueryObj(sql);
Query.ExecSql()
A more detailed explanaition can be found at
http://dpp.sagecrm.com/blogs/hints_tips_and_tricks/archive/2009/07/10/useful-date-functions.aspx