Write a VisualForce page to meet the below requirement. If Lead status is not contacted then comments field should be enabled and it should be mandatory.
Is this an Interview/Exam question or something? That's a very strange way to phrase a question otherwise!
Unfortunately, it doesn't really contain enough information to actually help you really.
Here's two lines for free though
<apex:page standardController="Lead">
// whole bunch of <apex:input> fields here to build the input, with some logic about whether comments is enabled or not
</apex:page>
I mean, looking at it - with what you've given us to read, I wouldn't even want to do this in Visualforce anyway.. I'd suggest looking into whether you can just do this with page layouts and permissions etc. doesn't seem too hard. Writing a custom page is just going to be coding yourself into a maintanence headache (and I never say that!)
Hi SankeshReddy Nallamilli
i have created a vf page with name "LeadcommentRequired"
pass the id of the record in url like '00Q7F000001pN1y '
https://varun007-dev-ed--c.ap5.visual.force.com/apex/LeadcommentRequired?id=00Q7F000001pN1y
try this code its working fine for your requirement.
Make my answer as best if it is helpful.
Thanks
Varun
All Answers
Unfortunately, it doesn't really contain enough information to actually help you really.
Here's two lines for free though
I mean, looking at it - with what you've given us to read, I wouldn't even want to do this in Visualforce anyway.. I'd suggest looking into whether you can just do this with page layouts and permissions etc. doesn't seem too hard. Writing a custom page is just going to be coding yourself into a maintanence headache (and I never say that!)
Hi SankeshReddy Nallamilli
i have created a vf page with name "LeadcommentRequired"
pass the id of the record in url like '00Q7F000001pN1y '
https://varun007-dev-ed--c.ap5.visual.force.com/apex/LeadcommentRequired?id=00Q7F000001pN1y
try this code its working fine for your requirement.
Make my answer as best if it is helpful.
Thanks
Varun