function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
nandananandana 

Could you please tell me how to do this.

I have 3 incident types like A,B,C. Incident type A only having incident description field. And incident type B and incident type C having no incident description field. So if i choose incident type A then incident description div tag it should be display in pdf page. If i choose incident type B or incident type C then incident description div tag it shouldn't be display in pdf page(hide that div tag).
Sathish balajiSathish balaji
Hi Nandana,

Enclose your Div tag inside <apex:outputpanel> along with "rendered" attribute. The rendered attribute conditionally makes the component visible. It takes either of two values "true" or "false". In your case, if the incident type is A, then set a boolean to true in the apex class and refer it in the rendered attribute. If teh incident type in B or C, set the boolean as false.
<apex:outputpanel id="type" rendered="{!incident_type_boolean}">
<div>
//your code here
</div>
</apex:outputpanel>

Best Regards,
Sathish Balaji
nandananandana
Thank you for your reply. Can you please explain how to create  Apex class.
Sathish balajiSathish balaji
Hi Nandana,

Can you explain the requirement in detail? 
1. What is the data type of the incident type field?
2. Are you providing the incident type through VF page?
3.What type of controller you are using in VF page, standard or custom controller?
4. How do you want to render the page as PDF, by clicking on the save button or just by choosing the incident type?

Best Regards,
Sathish Balaji