You need to sign in to do that
Don't have an account?
Need sample code
Hi All
I have a VisualForce page embeded as a related list in Opportunity, which takes the Opportunity id and displays certain details.
There is a Checkbox in the VF page. when this Checkbox is selected I need to update another object at backend and refresh the entire Opportunity detail page.
The VF page is already there, i just have to incorporate this change. Can someone give me some sample code looking at which I can understand how do I use Java script, and how do I update the object with the value of Opportunity ID and the field (on VF page) pervious to the Checkbox.
I am a Newbie, any help will be greatly appriciated.
Regards
Completed the code. For reference pasting the code here.
Call the JavaScript via the checkbox
Inside the <Script> pass the parameter and then call the Apex:actionfunction to call the method in the controller:
All Answers
You can call a java script function on click
function checked(){
window.parent.location.href='/{!Opportunity.id}';
}
Completed the code. For reference pasting the code here.
Call the JavaScript via the checkbox
Inside the <Script> pass the parameter and then call the Apex:actionfunction to call the method in the controller: