1

I'm trying to create a field on the Case object that references a user lookup field on the Account object.

Using this:

Account.Customer_Success_Rep__c

Returns the correct user, but shows the Salesforce ID and I'd like the name.

My problem is that this:

TEXT(Account.Customer_Success_Rep__c)

Gives me this error:

Error: Incorrect parameter type for function 'TEXT()'. Expected Number, Date, DateTime, Picklist, received Lookup(User)

Why isn't this working? How can I get the text of the field?

4

You'd want to use the relationship instead:

Account.Customer_Success_Rep__r.FirstName & " " &
Account.Customer_Success_Rep__r.LastName 

TEXT is specifically for converting numbers, dates, and the like to strings so you can manipulate them, not for converting ID values to a label of some sort.

A field where you can select a user with the magnifying glass is not a "picklist", it is a "lookup" field.

| improve this answer | |
  • Concatenating first name with first name? – Adrian Larson Jul 11 '17 at 17:04
  • @AdrianLarson lol, It's been a long, long morning. – sfdcfox Jul 11 '17 at 17:05
2

Customer_Success_Rep__c field is a lookup field, you should be accessing some other field in that lookup. Try making your formula Account.Customer_Success_Rep__r.FirstName (or other field if FirstName is not what you want).

If you access the Customer_Success_Rep__c it returns the ID of the lookup object, but accessing as Customer_Success_Rep__r (with r), you get access to its fields.

You can also use the "Insert Field" helper when defining the formula instead of typing it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.