You need to sign in to do that
Don't have an account?
Staci
Pre-populating current date/time with URL
I have this:
PageReference retPage = new PageReference('/' + changeID + '/e?00Na000000BA4Ip=Rejected&00Na000000BA4IU=True&00Na000000BA4IW=UserInfo.getName()&00Na000000BA4IV=');
This needs to equal the current date and time. How do I accomplish that?
00Na000000BA4IV=
How about formating the result as string and calling html escape method on the result
There are other escape methods you could try if it does not work - escapeEcmaScript, check the docs
All Answers
You could try using System.now() or DateTime.noe(). Both with generate the current datetime. Are you looking for something more detailed?
Hi Ryan
That's what I was trying to use and both when they try to populate error and says invalid date and time and you see System.now() in the box. I've tried {} around it, ' ' and " " around it. All act the same.
Doesn't this work:
PageReference retPage = new PageReference('/' + changeID + '/e?00Na000000BA4Ip=Rejected&00Na000000BA4IU=True&00Na000000BA4IV='+datetime.now());
How about formating the result as string and calling html escape method on the result
There are other escape methods you could try if it does not work - escapeEcmaScript, check the docs
thanks leva, that worked