Posts

Showing posts from October, 2014

Get Default Workflow list in AX 2012

Image
How to Fetch Default Workflow list in AX 2012
Hi Folks,
Here is a job to fetch existing workflows in AX 2012.
static void TheAxapta_WFList(Args _args)
{
#AOT
Treenode                workflowTypesNode, workFlowNode;
int                     i;
int                     nodeCount;
str                     workflowName;
SysDictWorkflowType     sysDictWorkflowType;
SysDictWorkflowCategory sysDictWorkflowCategory;
; workflowTypesNode = treenode::findNode(#WorkflowTypesPath);
nodeCount = workflowTypesNode.AOTchildNodeCount(); workFlowNode = workflowTypesNode.AOTfirstChild();
for (i=1; i<=nodeCount; ++i)
{
workflowName = workFlowNode.AOTgetProperty("Name");
try
{
sysDictWorkflowType = SysDictWorkflowType::newTypeName(workflowName);
sysDictWorkflowCategory = new SysDictWorkflowCategory(sysDictWorkflowType.category());
info(sysDictWorkflowCategory.label() + ";"
+ sysDictWorkflowType.label() + ";"
+ sysDictWorkflowType.help());
}
catch ( Exception::Error)
{
exceptionTextFallThrough();
}
workFlow…

Another year...... MVP

Hi All,  I would like to share this golden moment with you all, Again I’m awarded by Microsoft as Most Valuable Professional (MVP) this year as well. Its third time in row when I recognized by Microsoft for Dynamics AX.  Thanks to each of you for your guidance and support.    https://mvp.microsoft.com/en-us/PublicProfile/5000410?fullName=Deepak+Agarwal Old Post:
1st Year Award

-Harry Follow us on Facebook to keep in rhythm with us. @Facebook

ValidTimeStateFieldType Property on Table- AX 2012 R2, R3

Image
ValidTimeStateFieldType Property on Table- AX 2012 R2, R3 What is the use of “ValidTimeStateFieldType” property on tableDate effective data is tracked in a table that has its ValidTimeStateFieldType changed from its default value of None. Also, an index with its ValidTimeStateKey set to Yes must be added on the table. The system automatically adds the fields named ValidFrom and ValidTo to the table, which will be of type date or utcdatetime. The system automatically prevents overlap between the date ranges in these two fields among rows that track the same entity. How to fetch records from this type of tablesThe following code sample returns the records that are effective during 1/1/2001 and Current date: staticvoid theAxapta_ValidTimeState (Args _args) { vendTable vendTable; TaxRegistration TaxRegistration; DirPartyLocation DirPartyLocation; date ToDate = today(); date FromDate = 01\01\2001; whileselect validtimestate(fromdate, ToDate) * from TaxRegistration join DirPartyLocation whe…