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
SamIAMSamIAM 

Is it common to use Visualforce to over the challenge of Last Name being required in Leads?

Is it common to use Visualforce to over the challenge of Last Name being required in Leads?

 

I have a client that uses company names not people, and needs a work around from having to always enter name

bob_buzzardbob_buzzard

I'd be hesitant to recommend visualforce for this, as it means that maintaining the page is much more difficult.  We've tended to override the new button and pass default lastname information on the URL as a name=value pair.

mtbclimbermtbclimber

bob_buzzard wrote:

I'd be hesitant to recommend visualforce for this, as it means that maintaining the page is much more difficult.


True it's more difficult. Difficulty can be mitigated with fieldsets which though you do still lose some flexibility that may not be necessary for the new case which is what it seems is the scope of your use case.
Other factors to consider in the solution are how often you actually need to change the layout and whether for the person doing it modifying XML is drastically more difficult than using the layout editor.
To the original question, I have seen Visualforce used to dynamically handle required-ness as well as a way to get past "required for layout" sorts of restrictions.  The trade off of managing Visualforce markup vs. page layout editor is always assessed and comes down to whether the value is worth the costs. Both are subjective and often once a Visualforce solution discussion is opened the possibilities of what else can be done - duplicate detection, data augmentation from an external system, etc become more attractive once the cost of losing the layout editor has been assumed.
Food for thought.

We've tended to override the new button and pass default lastname information on the URL as a name=value pair.

Keep in mind this solution is not supported.