How To Update Data In D365

preview_player
Показать описание
Learn how to update data in D365 using x++. There are several important things you need to know in order to successfully update data through code.
#Dynamics365 #Dynamics365Musings #MSDyn365 #MSDyn365Community #DYN365O #D365FO #Microsoft #d365ug #xppgroupies #D365 #Update #DoUpdate #Update_Recordset #forupdate #TTSBeginTTSCommit

Subscribe to my channel:


Table of Contents:

00:00 - Intro
00:07 - Update Data Using Forms
02:07 - Create Runnable Class
03:22 - Declare Table Buffer
04:18 - Select A Record
04:56 - ForUpdate
06:17 - Find Unique Index
08:23 - Check If Found
09:11 - ttsbegin and ttscommit
10:33 - Set data and call update method
11:34 - Run The Code
13:17 - DoUpdate
15:28 - Update_recordset
16:11 - Summary
16:51 - Outro
Рекомендации по теме
Комментарии
Автор

Great vid Peter, thanks so much! I made a couple discoveries which I hope helps someone out there:
1. The script must be run in D365 in the same legal entity as the record(s) being updated, otherwise it doesn't find the records.
2. Every time you create a new deployment package (to test in sandbox) you need to create a brand new model for it, otherwise D365 won't accept it, and changing the version # of the model doesn't help (seems like a bug/oversight). So if you are updating records in multiple entities you will need multiple deployment scripts (each with their own separate model).

emergentform
Автор

awesome video once again peter. always doUpdate :)

bentickner
Автор

Thanks for sharing your knowledge with us :) Easily the best d365 videos out there, the in-depth explanations are a rare thing

nikola
Автор

Hello Peter, really appreciate your videos and simplicity on how you demo the basics for X++. I'd really appreciate if you got some time to describe the table event handlers and how to get previous and newer values on a record using the onUpdated and onUpdating events... again, thanks for your videos!

albertochayo
Автор

Hello peter
I am new to d365 xpp coding. You showed so simply, how easy it is to code.
Thanks

jamesT
Автор

Thank you so much Peter for the video, I just have question, If let's say after development of the class. how we can publish this to the production server and update the value we write a code to it?

mohammeddhaif
Автор

Hi Peter, is there a way to use a update_recordset and get the latest record from a joined table?
for example I have 2 table, TableDevice and TableRepairTransaction
TableDevice have and DeviceID and RepairCompletionDateTime column
TableRepairTransaction have DeviceID and LastRepairDateTime column
TableRepairTransaction can have multiple record with same DeviceID but different LastRepairDateTime and I want to get the latest LastRepairDateTime and update it on TableDevice
I tried order by desc but it its not allowed on update_recordset

RedentorDelaCruz-nn
Автор

Thank you for the video!Sorry I can only speak little English. I wonder if there's a way that, I can modify data in the datasource before display it in the form without update the table. For example, show an "expensive" if the price is greater than $100 while show a "cheap" if not, but i don't want to change the price field in the table to "expensive" or "cheap"as well, I hope they remain the exact price number. Could you please tell me whether this is possible?Thank you again!!

ZhonghaoQian