Skip to main content

Notifications

Announcements

No record found.

Supply Chain Management forum
Unanswered

New Grid - Paste from Excel

Posted on by 3
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?
 
 
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 288,584 Super User on at
    New Grid - Paste from Excel
    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.
  • Martin Dráb Profile Picture
    Martin Dráb 225,864 Super User on at
    New Grid - Paste from Excel
    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.
  • Blangero Profile Picture
    Blangero 3 on at
    New Grid - Paste from Excel
    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.
  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 288,584 Super User on at
    New Grid - Paste from Excel
    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
    Blangero 3 on at
    New Grid - Paste from Excel
    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!
  • Anton Venter Profile Picture
    Anton Venter 10,547 Super User on at
    New Grid - Paste from Excel
    Hello,
     
    What do you mean by "new grid"? How are you pasting data from Excel? Can you share more information?

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,584 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,864 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans