AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 14.09.2017, 13:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
shashidotnet: SystemSequences Update
Источник: https://shashidotnet.wordpress.com/2...uences-update/
==============

If you ever get a error where the RecId being inserted into the table already exists then the SystemSequences table is to be blamed for this

In some of my previous blog posts, i update the system sequence table’s NextVal record, which determines the RecId to be given. However, this is tricky.
  1. Update in SQL
    • Stop the AOS
    • Update the NextVal recod in the SystemSequences Table
    • Start the AOS
  2. Write a job
static void SetNextRecId(Args _args){ SystemSequences seq; ttsBegin; select firstonly forupdate crosscompany seq where seq.tabId == 123456; // use the table id here or tablenum() seq.skipTTSCheck(true); seq.skipDatabaseLog(true); seq.selectForUpdate(true); seq.nextVal = 5637123456 + 1; // enter the last recId for the table seq.update(); ttsCommit;}You may need to run this job and restart the AX client only if the just the above doesn’t work

static void sab_recIdSequenceFix(Args _args){ SystemSequence systemSequence = new systemSequence(); Tableid tableId = 123456; // use the table id or tablenum() here systemSequence.suspendRecIds(tableId); systemSequence.suspendTransIds(tableId); systemSequence.flushValues(tableId); systemSequence.removeRecIdSuspension(tableId); systemSequence.removeTransIdSuspension(tableId);}
Filed under: Ax 2009, Ax 2012, Dynamics Ax, X++ Tagged: Ax 2009, AX2012, Dynamics Ax, x++

Источник: https://shashidotnet.wordpress.com/2...uences-update/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 15 Blog bot Dynamics CRM: Blogs 1 10.02.2016 10:26
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 17 Blog bot Dynamics CRM: Blogs 0 10.05.2014 06:30
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 16 Blog bot Dynamics CRM: Blogs 0 23.01.2014 03:15
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 14 Blog bot Dynamics CRM: Blogs 0 12.07.2013 07:13
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 13 Blog bot Dynamics CRM: Blogs 0 27.03.2013 22:12
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 21:36.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.