You need to sign in to do that
Don't have an account?

How to initialize Date variable in flow?
Anyone able to successfully initialize a Date variable at the start of a Flow either using <apex:param> in a Visualforce page or by passing an interview map when constructing a Flow instance within an Apex controller (as per this page)?
I get an error with either technique. When I use <apex:param> it complains that the types don't match.
The only thing that works is initalizing through the URL itself.
I even tried to initialize using a string date (i.e. yyyy-DD-mm), just like with the URL technique. Specifically, I made the controller property bound to <apex:param> a String type, and for the interview map I used a string value rather than a Date object. But these made no difference.
I get an error with either technique. When I use <apex:param> it complains that the types don't match.
The only thing that works is initalizing through the URL itself.
I even tried to initialize using a string date (i.e. yyyy-DD-mm), just like with the URL technique. Specifically, I made the controller property bound to <apex:param> a String type, and for the interview map I used a string value rather than a Date object. But these made no difference.
To get the <apex:param> technique to work I ended up creating a new Date variable. Not sure what was wrong with the variable I had been using but this might be a last resort for others to try if they run into similar odd behaviours.
Getting the other technique of passing in an instance of Map<String, Object> to the flow constructor was a lot trickier.It seemed the issue had to do with a property I had defined that referenced the flow. This property was bound to the finishLocation attribute of the flow:interview component. The solution was to replace the finishPage property with a getfinishPage method, the code for which was basically what I had in the property get method. Why this worked and the above did not I have no idea.