Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

"Value is not an array" when editing quote items

(0) ShareShare
ReportReport
Posted on by 334

We are running v9 on-prem and are seeing the error message "Value is not an array" pop up in an alert dialog when editing the quantity of a quote item in the Products sub-grid on the quote form.

Debugging the standard Javascript indicates that this is because, when the item is saved with the new quantity, it then tries to set the value of the other fields on the item (presumably to update the total column etc.) As part of this it tries to set the Unit field, but instead of setting it to the expected array of 1 lookup value it tries to set it just to the name of the selected unit.

This looks like a general bug that would affect anyone using this functionality, but as I can't see any other references to it online, are there any more steps I can take to try and prevent this error? Everything about updating the item itself seems to be working as expected, we're just seeing this annoying message appear afterwards.

  • Mark Carrington Profile Picture
    Mark Carrington 334 on at
    RE: "Value is not an array" when editing quote items

    I've made a completely unsupported change to fix the Javascript on our on-premise install - I modified CRMWeb\_static\_grid\GridControl.js and changed the $Dq_0 function to include an additional case to the switch statement:

    case "lookup":
    this.setTableCellValue($p0, $v_1, [{ id: $v_2["oid"], entityType: $v_2["otypename"], name: $v_2["value"] }], false);
    break;

    Again, this is entirely unsupported but keeps our users happy for the time being.

  • Mr. Dynamics Profile Picture
    Mr. Dynamics 25 on at
    RE: "Value is not an array" when editing quote items

    Mark,

    Have you found a solution to this issue? We have a ticket open with Microsoft, but perhaps you've found a simple fix?

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,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans