Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Bulk Update - change Multiple Records and trigger Update Plugin

Posted on by Microsoft Employee

Hello Everyone,

Let's have a scenario  -I select multiple records in a view, click edit and change a A field in Order (Entity) by the bulk edit tool. This A field needs to change two fields : Item X(calculated field) and Item Y (Text type). Item X is successfully changed for all selected records at time but for Item Y is not changed because it needs to calculate from other fields info like ( Item Y = A field * total ; Total = Item 1+ item 2 + item 3 in Order entity.)

As of now , for Each record , I'm able to write a plugin(Update) to do calculations based on change of A field.

How to do for Multiple selected records using same plugin?

I'm getting error when I'm selecting multiple records in Bulk edit tool?

An error has occurred. The selected action was not completed for one or more records.

On selection of single record --> no error and full selected record is open in new tab!

We use CRM 2016 OnPremise.

Can anyone help me in solving this problem ? I prefer to solve this problem by plugin but open to check the solution using Workflow also?

Thank you,

Deepthi

*This post is locked for comments

  • Suggested answer
    Jaya Krishna Profile Picture
    Jaya Krishna 65 on at
    RE: Bulk Update - change Multiple Records and trigger Update Plugin

    There are two approaches you can try

    1. Use On - Demand Workflow which will trigger on click of bulk edit .. Write Custom Workflow logic in new step and achieve your functionlity

    2. Second Approach - Open Records page of specified entity - Click on Export to Excel - Open Excel Online option --> Write Rules to Perform required operations in Excel Online and then click on Save Changes to Dynamics button which will be helpful for you in manual editing

  • Durgaprasad Profile Picture
    Durgaprasad 80 on at
    RE: Bulk Update - change Multiple Records and trigger Update Plugin

    Hi,

    I'm having the similar issue. My plugin is not calculated the correct result. 

    Are you able to resolve the issue. Please help the solution.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Bulk Update - change Multiple Records and trigger Update Plugin

    Hi! 

    Can you please provide message of this error?

    I think you can take all the code in your plugin in try/catch and create note for the current entity with your error in catch. After that select entities which were not updated and take a look for the error and try to resolve it.

    Hope this helps

     

    Vlad

    http://dynamicalabs.com/

    Disclaimer: Any post on this page provided "as is" without warranty of any kind and is for educational and information purposes only. We disclaim any liability arising from any reliance placed on any post

  • RE: Bulk Update - change Multiple Records and trigger Update Plugin

    the cause/solution might lie in the fact that bulk edit never allows any client-side operations (JS, business rules?) to execute, which may be a pre-requisite to complete calculated fields.  so if we can find a way around the need for client-side calculations, maybe that's the solution.  

    So perhaps if, on bulk-edit only, you replicate the client-side calculations as part of the plug-in?

  • Inogic Profile Picture
    Inogic 24,094 on at
    RE: Bulk Update - change Multiple Records and trigger Update Plugin

    Try the below link,

    https://rajeevpentyala.com/tag/selection-action-was-not-complete-for-one-or-more-records/

     

    Hope this will help.

     

    Thanks!

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: Bulk Update - change Multiple Records and trigger Update Plugin

    Hi Deepthi,

     there is no reason why the plugin would not be working just because of the bulk edit. Does the error happen every time you use bulk edit? Can you bulk edit two records? If not, can you update both of those two individually without getting an error from the plugin?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans