You need to sign in to do that
Don't have an account?
Amita Tatar
rendering a field in vF page when checkbox value on standard page layout is changed
Hi,
I want to render a particular field in VF page when checkbox field on detail page will be checked. How i should do it? please help
Regards,
Amita Tatar
I want to render a particular field in VF page when checkbox field on detail page will be checked. How i should do it? please help
Regards,
Amita Tatar
Workaround 1:
after checking the check box and user do save the record then you can provide a button or link on the detail page. And on click of that button you can open the VF page with fields you want to display. If not check show a warning message that you need to check the check box to see the fields.
Workaround 2:
after checking the check box and user do save the record then change the record type of the record using workflow and assign a different page layout to the changed record type where you can show the field.
In a visualforce page you can use the AJAX components to conditionally show/hide sections or elements of the page. Please refer to the following tags in the visualforce developer guide.
apex:actionSupport
apex:actionFunction
apex:actionRegion
apex:actionPoller
You will also need to get a clear understanding of the "Rendered" and "ReRender" attributes that you can find in many of the visualforce tags.
A simple example is available at http://www.oyecode.com/2013/04/how-to-re-render-part-of-visualforce.html
After that have a look at Bob Buzzard's excellent blog post which explains how they work in a simple example.
http://bobbuzzard.blogspot.com.au/2011/02/visualforce-re-rendering-woes.html
I think below code can conditionally display the VF page based on the checkbox. In rendered you can put if condition
<apex:page standardController="ObjectName" rendered="{!ObjectName.CheckBoxName==TRUE}" >
<apex:form >
....your data to display
</apex:form>
</apex:page>