Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Can we use Update_Reco...
Finance forum
Answered

Can we use Update_Recordset for a single record or just less number of records updating?

Posted on by 87
Hi experts, 
        I am just wondering whether I could use update_recordset to update a value for a single record. Microsoft has used update_recordset where there are lot of records needs to be updated. But is there any downsides we will be having if we use the same for a single record updation? Is there any reason for us to user the update method in this scenario? 
       Also, I wanna understand whether update_Recordset will process anything different when compared to normal update method since it as well hits the table's update method unless the table methods is been forced to not to be called. 
 
Thanks in advance. 
  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 228,501 Most Valuable Professional on at
    Can we use Update_Recordset for a single record or just less number of records updating?
    When you run update_recordset, you update all records meeting a condition. There may be multiple records, but it may be just a single one or none at all. Therefore yes, it can be used for a single record.
     
    If update() method is overriden, it'll be called by update_recordset (unless suppressed), as you correctly mentioned. But that means that you're losing performance benefits of update_recorset, because it needs to fetch records from DB and call the method on each of them, instead of simply sending an UPDATE command to database.

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans