Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Field Service forum / WorkOrder Script error...
Field Service forum

WorkOrder Script error - msdyn_/WorkOrder.Library.js

(0) ShareShare
ReportReport
Posted on by 140

When Work Order loading, following Script error popup. Please help me to solve it 

0714.Capture.JPG

log file 

0714.Capture.JPG

Thanks

  • aindike Profile Picture
    aindike 140 on at
    RE: WorkOrder Script error - msdyn_/WorkOrder.Library.js

    5037.Capture.JPG

  • Suggested answer
    aindike Profile Picture
    aindike 140 on at
    RE: WorkOrder Script error - msdyn_/WorkOrder.Library.js

    Duplicate customized form

  • moko33 Profile Picture
    moko33 1,784 on at
    RE: WorkOrder Script error - msdyn_/WorkOrder.Library.js

    Thank you Thomas for the feedback. I also would appreciate a recommendation or direction from Microsoft for that in order to have better decision criteria when trying to balance advantages against disadvantages  case by case.

  • Thomas David Dayman Profile Picture
    Thomas David Dayman 11,323 on at
    RE: WorkOrder Script error - msdyn_/WorkOrder.Library.js

    I think what happens is that if you customise the OOB form you may potentially lose what the original form from Microsoft was suppose to be if you customise it too much.

    I had an experience where someone removed subgrids on the main product form which then broke some Microsoft functionality we wanted to use in the future. I had to load up a trial to find out what was on that form originally.

    I personally would like to get Microsoft's opinion on this for "best practice". I can see that both ways could cause issue in future potentially especially now that Field Service is updating on a near regular bases.

  • moko33 Profile Picture
    moko33 1,784 on at
    RE: WorkOrder Script error - msdyn_/WorkOrder.Library.js

    Yes we got exactly the same issues and feedback from MS Support. On the one hand it was a lot of work to fix that for all our custom forms and on the other for i.e. the Resource form it did not work for us at all what MS and Thomas describes. So we than took the OOB Resoure form and added all our custom fields and custom scripts manually to it.

    Learning for the future: try to use the OOB forms and customize them instead of first replicating them before customizing. Anybody disagrees?

  • Suggested answer
    Thomas David Dayman Profile Picture
    Thomas David Dayman 11,323 on at
    RE: WorkOrder Script error - msdyn_/WorkOrder.Library.js

    So I had the same issue and the problem arises from duplicating the main work order form from a much older version of Field Service.

    Microsoft have recently updated the main Work Order form with new JavaScript files. What users need to do is add the missing JavaScript files to their custom form and remember to enable the 'Pass execution context as first parameter' on the WorkOrder.js file as well 

  • moko33 Profile Picture
    moko33 1,784 on at
    RE: WorkOrder Script error - msdyn_/WorkOrder.Library.js

    Great. May I ask you: was it a duplicate of your customized form or a duplicate of the standard form that came out of the box?

  • Suggested answer
    aindike Profile Picture
    aindike 140 on at
    RE: WorkOrder Script error - msdyn_/WorkOrder.Library.js

    Problem solved. What I have done  (in consultation with MS) is to create a duplicate form (WO-Duplicate) and it seems to be working fine now. So what we need to do is to deactivate old form and use this new one.

  • aindike Profile Picture
    aindike 140 on at
    RE: WorkOrder Script error - msdyn_/WorkOrder.Library.js

    Yes.

  • moko33 Profile Picture
    moko33 1,784 on at
    RE: WorkOrder Script error - msdyn_/WorkOrder.Library.js

    Let me guess: it is a custom form?

    And that appeared after upgrading from FS 7.x to 8.x?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans