So after hitting some view state errors I cleaned up my code to significantly decrease the size of the viewstate.
It sort of worked.
My view state is now at 88kb in size. Inspecting the viewstate shows that my controller takes up about 15kb, the other 73kb is used by "Internal". What is "Internal" and why is it so big?
To make this happen, I've created a new button on the Contacts list section of the Account page (right next to the default "New Contact" button there) (there are other ways to do this as well, like via s-controls, but this is the simplest for testing the solution.):
Display Type: List Button
Behavior: Display in existing window without sidebar or header
content source: URL
(The con18 fields are the Other address fields on the Contact edit page.)
When you use this button, however, it still automatically populates the Mailing address fields with the Account address. In fact, even if I add to the URL to explicitly blank out the Mailing address fields, like this:
(the con19 fields are thhe Mailing address fields on the Contact edit page)
it still populates the Mailing address fields. However, if I change the above URL to include something like
(and not change any of the other code from the above example), it does not populate the Mailing address fields (other than that now Mailing Country = x.)
There must be some script on the page that looks up the provided account name, finds its address info, and puts it into the Mailing address fields on the account unless any Mailing address is provided. Note that I am not even passing the "id=" parameter, either.
It is pretty annoying that SFDC just assumes that you need to have the mailing address populated on the Account Contact with a specific address from the Account, without providing any opportunity to change that functionality. Sure, I could rename all the fields, or build some kind of record save workflow to blank out the fields, but those aren't really very good solutions.
Does anyone know how to override this Mailing address population activity or have a better solution?