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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Unanswered

New Grid - Paste from Excel

(1) ShareShare
ReportReport
Posted on by 10
We have experiencing bad performance on the SalesOrder form when inserting or updating multiple lines by pasting data from Excel.
Our investigation revealed that certain validations and calculations for the entire order are triggered each time a new line is created or updated,
We believe that eliminating these actions could greatly enhance performance.

To address this, we need specific indicators, events, or methods that can help us:

1. Identify when a line is in "bulk update" mode (pasting from Excel).
2. Determine if a line is the last one in a "bulk update" (pasting from Excel).
3. Implement pre-update or post-update events to handle calculations for a "bulk update" action.

Despite searching through documents, I have been unable to find relevant information on these requirements. Therefore, I am reaching out to you
for your expertise. Could you please advise us on whether there are existing indicators, events, or methods that can achieve this?
If not, do you have any recommendations on how we might implement these features?
 
 
I have the same question (0)
  • Anton Venter Profile Picture
    20,680 Super User 2026 Season 1 on at
    Hello,
     
    What do you mean by "new grid"? How are you pasting data from Excel? Can you share more information?
  • Blangero Profile Picture
    10 on at
    Hi @Anton Venter, I've udpated New grid control and Pasting from excel to the end of origin post, thank you for looking into this!
  • André Arnaud de Calavon Profile Picture
    304,551 Super User 2026 Season 1 on at
    Moved the question to the Dynamics 365 Supply Chain Management forum as it is not Dynamics AX (2012, 2009, ...) related.
     
    You can't change the behavior of the grid control when pasting values. After the pasting of data from Excel all changes will be validated one by one and standard business logic will be executed as a user would input the data manually.
     
    Can you tell us how many lines you have in this order and how many lines get created or updated and with what field values?
  • Blangero Profile Picture
    10 on at
    Hi André Arnaud de Cal... 

    We are handling orders with a large number of lines (ranging from 10 to 300+ lines). The number of lines varies greatly depending on the customer and the transaction. Each line involves setting fields such as ItemIds, quantity, and unit of measurement (UOM). (for update case, quantity is the mostly update field)

    Our analysis of trace logs and code indicates that price and discount calculations are triggered each time a line is created or updated. These calculations are necessary only for the final order line since the final price and discount are based on the entire order, not individual lines. As a result, previous calculations are overridden without being persisted.

    To address this, we considered using the `SkipPriceCalculation` feature for bulk insert/update scenarios. However, we also cater to commerce call-center scenarios that require interactive line-by-line price and discount calculations.

    Therefore, we are seeking an efficient method to limit price and discount calculations to a single bulk operation rather than performing these calculations for each line insert/update. Specifically, we are looking for an event handler or a pre/post-paste method within the Grid control to manage this process.
  • Martin Dráb Profile Picture
    239,385 Most Valuable Professional on at
    The tool for importing data in bulk and implementing custom business logic is data management (with business logic in data entities). The pasting to a grid is meant for simpler scenarios.
     
    In data entities, you can use methods like postGetStagingData() and postTargetProcess() to run logic after importing data to staging tables or target tables.
  • André Arnaud de Calavon Profile Picture
    304,551 Super User 2026 Season 1 on at
    Hi Blangero,
     
    Thanks for the details. You don't tell us why you paste values from Excel. As Martin mentioned, you can then better use Data management for importing new lines or changes to lines.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 144 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 121 Super User 2026 Season 1

#3
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 108

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans