Skip to main content
Commonmark migration
Source Link

Something to Try:

##Something to Try: I'mI'm genuinely surprised that I've not seen this situation arise before. By populating the lookup with the Id you really shouldn't be seeing this problem yet somehow you are.

One thing to try would be to use immediate="true" on the actionSupport element that triggers the contact update:

<apex:actionSupport event="onchange" immediate="true" action="{!updateInstallerContact}" rerender="installerContact" />

This would skip any validation of values and potentially that check that's returning multiple contacts.

A Non-Answer Alternative:

A possible alternative would be to provide a picklist of valid contacts for the account chosen, and use that rather than a lookup field for the contact. Whether that is feasible or not depends entirely on the business case, should the user be able to choose any contact or just one from the account? Assuming there's not too many to choose from a picklist could work.

##Something to Try: I'm genuinely surprised that I've not seen this situation arise before. By populating the lookup with the Id you really shouldn't be seeing this problem yet somehow you are.

One thing to try would be to use immediate="true" on the actionSupport element that triggers the contact update:

<apex:actionSupport event="onchange" immediate="true" action="{!updateInstallerContact}" rerender="installerContact" />

This would skip any validation of values and potentially that check that's returning multiple contacts.

A Non-Answer Alternative:

A possible alternative would be to provide a picklist of valid contacts for the account chosen, and use that rather than a lookup field for the contact. Whether that is feasible or not depends entirely on the business case, should the user be able to choose any contact or just one from the account? Assuming there's not too many to choose from a picklist could work.

Something to Try:

I'm genuinely surprised that I've not seen this situation arise before. By populating the lookup with the Id you really shouldn't be seeing this problem yet somehow you are.

One thing to try would be to use immediate="true" on the actionSupport element that triggers the contact update:

<apex:actionSupport event="onchange" immediate="true" action="{!updateInstallerContact}" rerender="installerContact" />

This would skip any validation of values and potentially that check that's returning multiple contacts.

A Non-Answer Alternative:

A possible alternative would be to provide a picklist of valid contacts for the account chosen, and use that rather than a lookup field for the contact. Whether that is feasible or not depends entirely on the business case, should the user be able to choose any contact or just one from the account? Assuming there's not too many to choose from a picklist could work.

Source Link
Matt Lacey
  • 25.8k
  • 7
  • 68
  • 153

##Something to Try: I'm genuinely surprised that I've not seen this situation arise before. By populating the lookup with the Id you really shouldn't be seeing this problem yet somehow you are.

One thing to try would be to use immediate="true" on the actionSupport element that triggers the contact update:

<apex:actionSupport event="onchange" immediate="true" action="{!updateInstallerContact}" rerender="installerContact" />

This would skip any validation of values and potentially that check that's returning multiple contacts.

A Non-Answer Alternative:

A possible alternative would be to provide a picklist of valid contacts for the account chosen, and use that rather than a lookup field for the contact. Whether that is feasible or not depends entirely on the business case, should the user be able to choose any contact or just one from the account? Assuming there's not too many to choose from a picklist could work.