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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 31.01.2008, 15:00   #1  
Blog bot is offline
Blog bot
Участник
 
25,626 / 848 (80) +++++++
Регистрация: 28.10.2006
daxcoder: Number Sequence Framework Part I
Источник: http://daxcoder.blogspot.com/2008/01...rk-part-i.html
==============


Class: NumberSequence

Purpose:
This class is used for generating the sequence from code.It takes following parameters

NumberSequenceCode : This is the sequence code defined on the defined in the numberSequence table.

_makeDecisionLater : Decides whether the number generated is saved in the NumberSequenceList Table or not.If true it is saved , if false it is deleted on ttscommit call.


Flow and methods:

NumberSequence.Num() method is used to get the number. Then the following methods are called in sequence.

NumberSequence.runNumber(): This function calls the checkSetup() Function which apply some validations . Then getNumInternal() is called.

NumberSequence .getNumInternal() : This function calls the function getNumFromList() which returns the number from NumberSequenceList table with status free if any.If no number is returned from the getNumFromList() function then it calls the getNumFromTable() function which generates the new number.This function also insert the newly created number into the numberSequenceList Table with status active.

Other functions:
NumberSequence.abort() : This function should be used when the number generated is discarded. This function set the status of number number in numberSequenceList table to free.

NumberSequence.used() : This function should be called when the number generated is used. This function deletes the generated number from the numberSequenceList table.


Table: NumberSequenceList

On the call of NubmerSeq.GetNumFromTable() function.The generated number is inserted in the NumberSequenceList table with status active.
On the call of NubmerSeq.GetNumFromList() function.The number is updated in the NumberSequenceList table with status active from free status.

On the call of ttscommit after NubmerSeq.abort() function the status of the generated number is changed to the free.NumberSeq.abort() function sets the number Sequence to abort in the application container AbortIdx[];

On the call of NubmerSeq.used() function puts the value of globaltransId in NumberSequenceList Table which is deleted on ttscommit call.

Источник: http://daxcoder.blogspot.com/2008/01...rk-part-i.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Inside Dynamics AX 4.0: RunBase Framework Extension Part IV Blog bot DAX Blogs 0 02.10.2007 04:49
Inside Dynamics AX 4.0: RunBase Framework Extension Part III Blog bot DAX Blogs 0 02.10.2007 04:49
Inside Dynamics AX 4.0: RunBase Framework Extension Part I Blog bot DAX Blogs 0 30.09.2007 09:20
Inside Dynamics AX 4.0: Wizard Framework Extension Part II Blog bot DAX Blogs 0 29.09.2007 19:00
Arijit Basu: New Number Sequence for new AX Module Blog bot DAX Blogs 1 16.04.2007 10:39

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 03:02.