+ Start a Discussion
Paul.FoxPaul.Fox 

Mapping a Lead formula field to a Contact text field causes error after adding to managed package.

I have an application that stores data related to a lead or contact. I need the data to stay with the Lead when it is converted. To do this I have created a field on the Contact called Converted Lead ID, which I want to populate with the ID of the lead that the contact was converted from.

 

Since I can't map standard lead fields to custom contact fields, I created a formula field called Lead ID, and set it equal to the Lead ID.

 

Now I mapped the formula field to the Converted Lead ID field and tested it, and it all worked great. 

 

Then I found out a problem. I added these two fields to our managed package, and installed it in another org. Since package installation does not support field mapping, I went in to the Settings page to map the Lead ID to the Converted Contact ID. However, it gave me an error when I tried to do it saying that the Lead ID formula field length of 3900 was too long to map to my 18 character Converted Lead ID field.

 

Salesforce support says that can't help me because it's "Custom Code". Any suggestions?

jkucerajkucera

Just saw this trying to help another customer.  Can you re-open a support ticket and instruct them to escalate to the Marketing team per my note?

 

Sorry for the problems here - sounds like a bug for either the packaging team, or the marketing team.

  

jkucerajkucera

Actually, looks like formula fields may have a set length of over 1,000 characters.

http://community.salesforce.com/sforce/board/message?board.id=discuss&message.id=8038 

 

Might need to use a trigger instead of a formula field to limit the length. 

jhartjhart

John K - On a related note, if I have a simple mapping (same custom field on lead & contact), can I package that mapping so it happens automatically for my managed app?  Or do admins have to do it by hand after installing my app?

 

jhartjhart

Never mind, answered my own question.

 

Next question: Any plans to *make* the mapping packageable?  The list of things admins have to do after installing an app is long enough already =(