Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Custom lookup to WebResources

(0) ShareShare
ReportReport
Posted on by 230

Hi,

We have a custom entity which uses a JS to add a custom lookup to web resources. It works fine in 2015, but it breaks in 2016. See error below. Im by all means not a JS expert (lightly said). I would appreciate some expertise on this matter. 

Uncaught TypeError: Cannot read property 'get_valueElement' of undefined.

2018_2D00_02_2D00_09-10_5F00_37_5F00_03_2D00_Email-Templates-for-Brand_5F00_-Meshimer-_2D00_-Microsoft-Dynamics-365.png

*This post is locked for comments

  • Suggested answer
    Vipin J Profile Picture
    Vipin J 1,583 on at
    RE: Custom lookup to WebResources

    I have created a Custom Lookup Control

    You can check it here - http://vjcity.blogspot.com/2016/09/how-to-create-custom-lookup-control-to.html

  • Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: Custom lookup to WebResources

    Hi Joe,

    That's a good start, is it also downloaded with the rest of the files, when you open the form?

  • JoeO Profile Picture
    JoeO 230 on at
    RE: Custom lookup to WebResources

    Hi Rabu,

    Im able to display the file in a browser when visiting the URL. See screenshot below.

    CustomerLookupSript.png

  • Suggested answer
    Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: Custom lookup to WebResources

    Hi Joe,

    Can you please check in the sources if CustomLookupToWebResource.js is downloaded from the Server when opening the page?

    You might want to clear the browser cache before doing so, to make sure that all files are downloaded

    Regards,

    Radu

  • JoeO Profile Picture
    JoeO 230 on at
    RE: Custom lookup to WebResources

    Hi Radu,

    I've attached a full copy of all 3 files

    EmailTemplatesForBrand.Library.txt

    CustomLookupToWebResource.txt

    0184.FormsUtil.txt

  • Suggested answer
    Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: Custom lookup to WebResources

    Hi Joe,

    Maybe you're missing some references? Is CustomLookupToWebresource from a different library or namespace?

  • Suggested answer
    Emre GULCAN Profile Picture
    Emre GULCAN 2,379 on at
    RE: Custom lookup to WebResources

    Hi @JoeO

    Your library (FormsUtil) doesn't contain "get_valueElement" function, maybe it is different between 2015 and 2016 environments.

    It's not related about MS CRM SDK / client library because you're using custom/3rd party library that covers MS CRM client SDK.

    You should check your FormsUtil file

  • JoeO Profile Picture
    JoeO 230 on at
    RE: Custom lookup to WebResources

    Actually, that seems to work. No errors anyways... Now i have one more uncaught error

    Uncaught-Error-2.png

    Uncaught-Error-2.png Uncaught-Error-3.png

  • Suggested answer
    Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: Custom lookup to WebResources

    Hi Joe

    Between different versions - there can be changes in the SDK and as a result code that was working in an earlier version stops working in a newer one - i don't know if this is the case now.

    From the print screen from above you called getvalue, however this is case sensitive. Have you tried calling field.getValue() 0> Xrm.Page.getControl(arg).getValue()

  • JoeO Profile Picture
    JoeO 230 on at
    RE: Custom lookup to WebResources

    Tried getValue. See below.

    valueElement2.png

    valueElement2.png

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans