Announcements
Hello Everyone,
I have am receiving a script error when saving a Purchase order in Dynamics 365. I reported the issue and shared the error with Microsoft. They advised me that there is custom code in our form, that is unsupported by the break-fix team. I have only used the API customization in advanced options.
Can anyone advise what the error may be caused by, and how to fix it? The log file is pasted below.
TypeError: Cannot read property 'length' of undefinedat Function.i.ValidateWorkOrderSchedule (xyz.dynamics.com/.../PurchaseOrder.Library.js:13:66501)at Function.i.RunValidations (xyz.dynamics.com/.../PurchaseOrder.Library.js:13:45635)at i.OnSave (xyz.dynamics.com/.../PurchaseOrder.Library.js:13:45874)at Mu.executeFunction (xyz.dynamics.com/.../app.jsat xyz.dynamics.com/.../app.jsat o (xyz.dynamics.com/.../app.jsat Iu._executeIndividualEvent (xyz.dynamics.com/.../app.jsat Iu._executeEventHandler (xyz.dynamics.com/.../app.jsat Object.execute (xyz.dynamics.com/.../app.jsat O._executeSyncAction (xyz.dynamics.com/.../app.js
Hi admin4media,
As the log suggests , you are checking length of a variable which is either undefined or null , add debugger on the PurchaseOrder javascript and check where you're getting the error. If possible share the custom code written in PurchaseOrder.js and we can help. Also please mask the organization name while sharing the log in future. i.e 4media-group shouldn't be visible.
Hello,
Looks like this is the customization related to Dynamics 365 customer engagement but this forum is for Dynamics 365 for finance and operations.
Could you please repost in the customer engagement forum to get a swift support.
Thanks
Moved to D365 Customer Service forum.
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Syed Aqib Raza 25
Daniyal Khaleel 23 Most Valuable Professional
Ayesha Wajahat 16