You need to sign in to do that
Don't have an account?
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"+
"&CF00NR0000000cvG6={!Sales_Order__c.Name}"+
"&CF00NR0000000cvEt={!Sales_Order__c.Default_Warehouse__c}";
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"+
"&j_id0:j_id1:j_id29:j_id33:test={!Sales_Order__c.Name}"+
I need to be able to retain the earlier javascript code because of the complex validations........Can someone please help me with this prepopulating?
Hi,
Try this out:
window.location.href ="/a0I/e?retURL=%2Fa0I%2Fo&CF00NR0000000cvG6=" +{!Sales_Order__c.Name}+
"&CF00NR0000000cvEt="+{!Sales_Order__c.Default_Warehouse__c};
This should work.