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
BharathwajBharathwaj 

problem in making a custom Field as mandatory through VF

Hi People,

 

i got an idea from one of the threads that we can use  required="True" for making a picklist field mandatory in a page rendered inVF. can anyone please help with the Standard pages. so that i can make it mandatory on click on the Custom button.

 

Regards,

Bharath

Best Answer chosen by Admin (Salesforce Developers) 
BharathwajBharathwaj

Anand,

 

Thanks for your time. I got another method to resolve this issue. I used the OnClickJavaScript functionality of a custom button to achieve this.

 

The actual requirment was to make a Custom field in a Standard page(Lead, Opportunity) to become mandatory only when the Button is clicked.

 

Thanks,

Bharath

All Answers

Anand@SAASAnand@SAAS
The fact that it's a button means that you are allowing the user to choose to click. Making a button mandatory to click makes the page go against typical web page usability. What is your exact use case.
BharathwajBharathwaj

Anand,

 

Thanks for your time. I got another method to resolve this issue. I used the OnClickJavaScript functionality of a custom button to achieve this.

 

The actual requirment was to make a Custom field in a Standard page(Lead, Opportunity) to become mandatory only when the Button is clicked.

 

Thanks,

Bharath

This was selected as the best answer