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

reg: URL in Vf Page
hi
when we are clicking on new button in VF page there is one URL, but when i'm tring to save that record but forget to enter one required field so it's showing error "you must enter value".. But the URL here is different.. but i want to maintain the same URL here because i'm having the condition depends on URL for save..
how to achieve that?
if you are using custom save code then you can handle from your controller ...when ever insert is failed you can create a redirect url using page reference object
in that page when insert fails, there will be validation error.. so if we give the page redirect for URL how will we get that error in that page?
if there is an error set the RETURN NULL in your pagereference function
Please mark as solved if above is what you need
yes, but if we give return null then the URL is different, i want the same URL as that when we click on new button
try using pageref.setredirect(false)