Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

lookup - check if many result but nothing selected in javascript

Posted on by 68

Hi!

My problem:

I have a lookup on my form. If I write text in the textbox and multiple results were returned and I press 'Tab' I get an orange exclamation mark which prevents me from saving.

My problem here is, that I have to call a Service first before saving the form. If Service-Call is successfull I can save, otherwise not. But the service should not be called if saving the form is prevented. So how do I check that the lookup has more than one result. In other words: how to check if saving is possible?

thx

©a-x-i

  • Suggested answer
    XM-22040801-0 Profile Picture
    XM-22040801-0 11 on at
    RE: lookup - check if many result but nothing selected in javascript

    Hi,

    You can use isValid(). It is a supported method, see learn.microsoft.com/.../isvalid

  • Axi Bachlechner Profile Picture
    Axi Bachlechner 68 on at
    RE: lookup - check if many result but nothing selected in javascript

    I found a method: Xrm.Page.data.getIsValid() --> is this a valid way to solve my problem or is this an unsupported method?

    thx

    a-x-i

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans