Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Scripting error removal

(0) ShareShare
ReportReport
Posted on by 155

Hi,

*disclaimer: non trained or experienced person,  - please reply in VERY layman's terms.

I have some custom forms i have created for various entities (e.g: Order, Quote, etc..) however when saving the the below error appears.

-it doesn't seem to interfere or stop the form from progressing.

-It also doesn't appear to affect any function or form we use.

What is it, why is it appearing, and how can i either rectify it, or at least make the error notice not pop up?

Error log:

TypeError: Unable to get property 'Metadata' of undefined or null reference
at FS.SalesDocumentFormLoader.Library.GetOrderType (https://<businessnamehere>.crm6.dynamics.com/%7B636467084470000154%7D/WebResources/msdyn_/SalesDocument/SalesDocumentFormLoader.Library.js:1:5627)
at FS.SalesDocumentFormLoader.Library.FormApplies (https://<businessnamehere>.crm6.dynamics.com/%7B636467084470000154%7D/WebResources/msdyn_/SalesDocument/SalesDocumentFormLoader.Library.js:1:4301)
at FS.SalesDocumentFormLoader.Library.OnLoad (https://<businessnamehere>.crm6.dynamics.com/%7B636467084470000154%7D/WebResources/msdyn_/SalesDocument/SalesDocumentFormLoader.Library.js:1:904)
at Anonymous function (https://<businessnamehere>.crm6.dynamics.com/%7B636467084470000154%7D/WebResources/msdyn_/Utils/ResourceLoader.js?ver=1304408081:1:597)
at f (https://<businessnamehere>.crm6.dynamics.com/%7B636467084470000154%7D/WebResources/msdyn_/Utils/head.js?ver=1304408081:30:461)
at Anonymous function (https://<businessnamehere>.crm6.dynamics.com/%7B636467084470000154%7D/WebResources/msdyn_/Utils/head.js?ver=1304408081:30:2489)
at w (https://<businessnamehere>.crm6.dynamics.com/%7B636467084470000154%7D/WebResources/msdyn_/Utils/head.js?ver=1304408081:30:944)
at Anonymous function (https://<businessnamehere>.crm6.dynamics.com/%7B636467084470000154%7D/WebResources/msdyn_/Utils/head.js?ver=1304408081:30:2450)
at u (https://<businessnamehere>.crm6.dynamics.com/%7B636467084470000154%7D/WebResources/msdyn_/Utils/head.js?ver=1304408081:30:137)
at Anonymous function (https://<businessnamehere>.crm6.dynamics.com/%7B636467084470000154%7D/WebResources/msdyn_/Utils/head.js?ver=1304408081:30:2383)

*This post is locked for comments

  • Clem Profile Picture
    Clem 2,541 on at
    RE: Scripting error removal

    Hi eturyu,

    I'm glad that you find out the issue.

    Indeed I didn't give you the whole answer but let's say I prefer doing that than giving the real answer "sometimes".

    I assume you learnt more investigating than having directly the solution :)

    Enjoy crm it's a really cool application!

    Clément

  • Temmy Wahyu Raharjo Profile Picture
    Temmy Wahyu Raharjo 2,914 on at
    RE: Scripting error removal

    community.dynamics.com/.../236886

    Hi, based on that url maybe you should check weather the sec role already assigned in the form?

  • Verified answer
    Eturyu Profile Picture
    Eturyu 155 on at
    RE: Scripting error removal

    Hi All,

    Clement didn't give me the whole answer, but did put me on the right track to find it. I wish there was a "really helped a lot" button, other than just "verified"

    - It wasn't happening on OOTB forms, but it wasn't a windows error either so turning off the Microsoft notifications didn't fix it.

    Logic told me if it wasn't happening on OOTB forms, then it must be something that i had done to the forms. Either a field customized, or removed, or added that was causing the issue.

    Step 1

    I "saved as" each of the primary entity forms in their OOTB state to create new copies i can work on

    Step 2

    I added all the new fields that i had created, and tested. - no issue

    Step 3

    Edited existing fields to my liking, tested - no issue

    Step 4(and think this was what worked)

    Any field i didn't want to use, i made not visible by default on the form editor. I didn't remove the field this time.

    it all worked!

    To be clear, i'm completely self taught from you tube videos and this CRM forum. i'm sure there is a million better ways to fix this for someone who knows what they are doing.

    If i understand correctly, i think there was some background process or setting that  had relied on a box i removed from a form.

    TL;DR = Hide fields on your custom forms, don't remove them.  

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Scripting error removal

    Hi Eturyu, have you got this issue resolved?. I am facing the same error

  • Suggested answer
    Clem Profile Picture
    Clem 2,541 on at
    RE: Scripting error removal

    Hey,

    Does it happen on ootb forms as well ?

    Did you customize something else than just creating a new form (added some JS files, ?)

    If so please remove those and try again.

    A workaround if it doesn't impact the user experience (except the annoying popup)

    Each users can go to the Gear (top right) > Options > Privacy > "Never send an error report to Microsoft ..."

    Cheers,

    Clément

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,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,309 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans