I'm missing something simple here probably, but it's escaping me.
FormToUpdate.set("RETURNFUNDS_Sales_Rep_Signature_Date__c", {!today()} );
I've tried now() and today() above at the end, and it's failing. What can I put in lieu of that to simply stamp that field with the current date?
EDIT - Screenshot of error:
EDIT 2 for @techtrekker:
EDIT 3 - Solution Code (thanks @techtrekker for the assist)
var padmonth = {!MONTH(TODAY())};
if( padmonth.toString().length == 1 ) { padmonth = '0'+padmonth }
var padday = {!DAY(TODAY())};
if( padday.toString().length == 1 ) { padday = '0'+padday }
........
FormToUpdate.set( "RETURNFUNDS_Sales_Rep_Signature_Date__c" , '{!YEAR(TODAY())}-' + padmonth + '-'+ padday );