19.06.2023, 12:12 | #1 |
Участник
|
ievgensaxblog: MSDyn365FO. Truncate a table.
Источник: https://ievgensaxblog.wordpress.com/...ncate-a-table/
============== Now when storage capacity report is available you may want to clean up some data. One of the top one’s to grow out of control is document attachment history. You have standard batch job for the clean up, but if you have millions of records, it may take too long because that batch deletes only 50000 in a time. Using custom script you can delete them in no time! public static void main(Args _args){ ttsbegin; new SqlDataDictionaryPermission(methodstr(SqlDataDictionary, tableTruncate)).assert(); new SqlDataDictionary().tableTruncate(tableNum(DocuHistory), false); CodeAccessPermission::revertAssert(); ttscommit;} Источник: https://ievgensaxblog.wordpress.com/...ncate-a-table/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|