+ Start a Discussion

Prepopulate vf from javascript button.

Hi ,


I have  a javascript list button with a lot of validation and stuff for the selected lines.This button creates a new purchase order at the end  and opens the new purchase order form.My code was something like this:


..../*validation code*/...


--at the end if evrything is ok i have something like this where the fields of the new purchase order form get prepopulated using the address--


window.location.href ="/a0I/e?retURL=%2Fa0I%2Fo"+


Now for further development i needed to have a visualforce new form for purchase orders....

So now iam unable to prepopulate this....

the addresses look wierd..

window.location.href ="/a0I/e?retURL=%2Fa0I%2Fo"+


I need to be able to retain the earlier javascript code because of the complex validations........Can someone please help me with this prepopulating?




Try this out:


window.location.href ="/a0I/e?retURL=%2Fa0I%2Fo&CF00NR0000000cvG6=" +{!Sales_Order__c.Name}+



This should work.