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
Roger WickiRoger Wicki 

Prevent filling billing address on Lead conversion

Dear community

We are looking for a solution to prevent standard Lead-Account-mapping during conversion. As is, when converting and merging a Lead into an existing Account, an empty Account billing address would be set by the Lead address. While this behaviour is not so bad for completely new Accounts, in a merge it is devestating for us.

It often happens, that active clients still apply on our website, e.g. for an additional product or so. Those clients already have an Account. Usually, we only use the shipping address and only fill in the billing address if it happens to be different. That means, in most cases the billing address is empty. When a Lead is now converted and merged to such an Account and the Lead address differs from the Account's shipping address, we might not realise it until we already sent out the invoice to the wrong place. That is why we need to prevent that standard mapping.

I have looked into solutions with Apex but I am still clueless. According to this entry on stackexchange, at least the custom field mapping is executed already before the before triggers. I guess that standard field mappings also apply then. That leaves me literally no option to prevent the change. Because in the before trigger I would not even see that the billing address is being updated.

Does anybody have an input for this?
Kitty Kachhawa 6Kitty Kachhawa 6
Any answers on this?
Nate SchmolzeNate Schmolze
@Kitty, I'm sure that at this point you've resolved the issue for yourself, but am posting here for others. I too had the same question, and found your question here. I have a theoretical solution that might have helped you. I don't plan to implement it in our org, as it's a mere inconvenience for us, not really a devastating data issue. But here's what I would have tried in your case:

1. Create a checkbox on the Account object called "Revent Billing Address"
2. Create a formula checkbox on Lead called "Revert Account Billing Address" that always evaluates to TRUE
3. Map the lead checkbox to the account checkbox
4. In your accout trigger handler, get a reference to both the old and new version of the accounts being updated (Trigger.old and Trigger.new)
5. If Revert Billing Address is checked, uncheck it, and copy the billing address fields from the old to the new account. This should override the billing address provided in the lead.
Roger WickiRoger Wicki
We have employed a solution similar to this and it does work.