When you fire an action via a button or command link it submits the entire form, meaning all the required fields in the form are checked, so you're right in saying that targetted re-rendering would not solve your problem. The key is to split up your fields into logical groups, whereby when firing a specific action only the fields you want are included.
You can use <apex:actionRegion>
tags to split up the form into various groups of fields with their associated actions—when you fire an action in a region only the fields in that same region are sent.
Althernatively, you are now allowed to have multiple <apex:form>
s on the page, and this has the same effect with the added bonus of transferring way less information as it supports multiple view states.
Finally, another option is to use the immeditate="true"
attribute and value on your action buttons/links, but this can cause other difficulties so I'd try the above first.
We just implemented something like this for Opportunities - we didn't have a need for setting close date
.
A URL Hack is what you are looking for. This allows you to prepopulate the required fields, so users are not burdened with doing so themselves.
This will require:
- A custom button
- The URL Parameters for the fields you want to set.
To identify the URL Parameters:
To get the ID of the field we wish to populate go to the relevant
object in setup and click on the field we wish to populate. If you
check out the URL when you’re on this page, you can see the unique ID
given to this field.
You can take this ID and add it in your custom button:
Now, to turn this into something that actually works! Lets go to our
custom button editing page and enter a “?” after our little URL. This
acts as a separator and will allow us to enter the next part. The next
part will just require you to enter the ID of the field you grabbed
earlier with “=” and then the merge field value.
Workflows and triggers won't work because it's required through the interface.
Another work around, but more work; would be to customize the page itself and exclude those fields from the UI. Upon save of the page, you would need to populate the value though.
All said and done, no, you cannot universally eliminate the standard required fields.
Best Answer
You can make lookup fields universally required in the initial field setup. the documentation is generally very good but sometimes it's not perfect. usually the reason it is not perfect is that sales force makes something possible but doesn't update every single existing piece of documentation with the latest update or upgrade.
I think at the time of its writing you could not do this, but now you can do.