web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

check text value of lookup field

(0) ShareShare
ReportReport
Posted on by

Hi all

In CRM 2013 we use the case entity and I have a field case number

with lookups I want to just display the case number in the lookup and not the title which appears to be the default of the case lookup view in CRM 

I can search by case number and that is what i want but overall the lookup field displays the title  and I would like it to display the case number because that is how my clients like it already from the system we are migrating

How do i do this, JavaScript?  or mess with the lookup settings

can someone post an example of what i need to do

Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    razdynamics Profile Picture
    17,308 User Group Leader on at

    Hi Lucky

    The Lookup text always displays the Primary Key of the related entity, one approach is to Use a Web Resource JS to  display a field in the LookUp display which is not a PrimaryNameField such as Displaying case number in the display field instead of the Name

    The JS should Extract the CaseId from the Lookup. Query this from the Case entity using the SOAP message. Extract the caseNo field value then create a new look up object having the CaseNo field value in the display name and assign this to the lookup.

    Someone has already posted  sample code here to help you;

    community.dynamics.com/.../136580

    Best Wishes, Raz

  • TomSmelser Profile Picture
    1,570 on at

    Raz,

    If you dont need the name you could just create a worklow on save of case to either replace name with case number or change name to prefix it with case number. Either of these would result in number appearing in lookup.

    Best regards,

    Tom

  • Verified answer
    Community Member Profile Picture
    on at

    Raz your solution is great however a javascript error was occuring once the field was populated with the number causing the field to disappear  (how strange) so i used js   and a odata call to get the case number and display it in a seperate field along with the case title for reference and that worked just as well

    Thank you!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans