I'm using a standard Controller's save action (called by sc.save()) to save a new record. It returns a PageReference called OrderPage. When I look at the returned PageReference in the debugger, it is the ID of the saved record preceded by a '/'. I need to assign the id (without the '/' ) to a variable for further processing. The page hasn't loaded, and in any event OrderPage.getParameters().get('id) doesn't work nor does (getting desperate here) OrderPage.valueOf() or various attempts at using string functions to extract it.
Can anyone tell me how to do this? It seems like it would be a common use case, but a lot of searching both here and on the Internet has been unsuccessful.
I appreciate any help anyone can offer.