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

Community site session details

Session Id :
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 144

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

0714.Capture.JPG

log file 

0714.Capture.JPG

Thanks

I have the same question (0)
  • aindike Profile Picture
    144 on at
    RE: WorkOrder Script error - msdyn_/WorkOrder.Library.js

    4010.Capture.JPG

    This is the error 

  • moko33 Profile Picture
    1,788 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?

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

    Yes.

  • Suggested answer
    aindike Profile Picture
    144 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.

  • moko33 Profile Picture
    1,788 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
    Thomas David Dayman Profile Picture
    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
    1,788 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?

  • Thomas David Dayman Profile Picture
    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
    1,788 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.

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

    Duplicate customized form

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 > Field Service

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans