You need to sign in to do that
Don't have an account?
JenniferMJoy
Trying to Map a Contact Field to a Custom Object Field as a Read Only
This is the formula I wrote to try to map a custom Contact field to a custom object field, but it doesn't seem to be connecting and populating the custom object field with the information in the contact field. Is something missing?
IF(ISNULL(Contact_Met_del_del__r.Campaign_Connected_To__r.Name), Contact_Met_del_del__r.Campaign_Connected_To__r.Name ,Contact_Met2__r.Campaign_Connected_To__r.Name)
Hi Jen,
What is the relationship between the Contact and your Custom Object? Is it Master-Detail or Lookup?
Are you trying to do a Field Update, or is this a straight Formula(text) field?
Try using a LEN function (instead of ISNULL) when you evaluate your text field.
SF Guru,
The length of the text would differ per record depending on which campaign that contact was associated to. Is there still a way to use LEN if that's the case?
Hi Jen,
actually I'm more like a Salesforce Idiot Savant than a "Guru".
Anyway, you should be okay regardless of the length of the fields that you are evaluating. What the LEN function does (instead of the ISNULL function) is it counts the number of characters in a Text field. So when you say something like IF(LEN(Fieldname) = 0... or IF(LEN(Fieldname) <1... what you're basically doing is saying "If this field is blank, then..."
Without being able to look under the hood of your SFDC Org, your formula should look something like
IF(LEN(Contact_Met_del_del__r.Campaign_Connected_To__r.Name) < 1), Contact_Met_del_del__r.Campaign_Connected_To__r.Name,Contact_Met2__r.Campaign_Connected_To__r.Name)
Haha, making progress!...
Formula for how I got the field to populate: Contact_Met_del_del__r.Campaign_Connected_To__r.Name
Now that I got the field to populate, I think I need to create a validation rule similar to that first formula I started with. The issue is that there are 4 "Contact Met" options (contact met, contact met 2, contact met 3, etc). The field is only populated for one of the Contacts, so I want my validation rule to say if the field is blank in contact met, then check contact met 2, if blank in contact met 3, then check contact met 4. (9 out of 10 times, it will be in contact met 2 if not in the Contact Met. This is as close as I can get but I still get errors:
IF(LEN(Contact_Met_del_del__r.Campaign_Connected_To__r.Name) = 0, Contact_Met2__r.Campaign_Connected_To__r.Name, Contact_Met_del_del__r.Campaign_Connected_To__r.Name)
Daina Quinones is typing a message.
Daina Quinones: Error: Formula result is data type (Text), incompatible with expected data type (true or false).
Okay, you're probably going to have to amend your code to evaluate each field and move on to the next one if it is blank until it finds one that is populated.
If I have a chance, I'll try to take another crack at it later.