Process Indicator in Dynamics Ax 2012

by alirazazaidi on March 3, 2015

During one of my customization, I have perform a lengthy operation, during this process there is requirement to show process indicator, Code snippets I have found from

https://msdn.microsoft.com/en-us/library/aa841990.aspx

 

For this method I have to create a process helper class and add following snippet its static method

 

static void operationProgress_progressBars(Args _args)

{

#AviFiles

SysOperationProgress progress = new SysOperationProgress();

int i;

 

;

 

progress.setCaption(“File Transfer with Payment entries are in progess…”);

progress.setAnimation(#AviUpdate);

progress.setTotal(50000);

for (i = 1; i <= 50000; i++)

{

progress.setText(strfmt(“The value of i is %1″, i));

progress.setCount(i, 1);

}

}

 

 

For testing purpose I add a new form and on its button click, I added from following line code.

 

 

 

 

 

 

 

void clicked()

{

Args arg = new Args();

super();

 

startLengthyOperation();

 

ABCDHelper::operationProgress_progressBars(arg);

sleep(10000);

endLengthyOperation();

 

}

 

This progress operation must be run between two build in functions, that helps to cover the lengthy process in Dynamics Ax 2012.

3-3-2015 1-22-46 PM

{ 0 comments }

split string in dynamics ax 2012

by alirazazaidi on February 28, 2015

During one of customization scenario, I have come across to field which contains comma separated values. In C# and VB.net string.split method return into array of string. But in X++  split method return list. Following simple tip helps me to check that my required value exists in comma separated value.

public boolean getValidateStudentName(String50 _splitString)

{

 

List strlist=new List(Types::String);

ListIterator    iterator;

str _Value;

boolean _NotFound=boolean::true;

;

strlist=strSplit(_splitString,”,”);

iterator = new ListIterator(strlist);

while(iterator.more())

{

_Value =iterator.value();

if (_Value ==”Ali”)

{

_NotFound=boolean::false;

}

if (_Value ==”Raza”)

{

_NotFound=boolean::false;

}

if (_Value ==”Zaidi”)

{

_NotFound=boolean::false;

}

if (_Value ==”Lahore”)

{

_NotFound=boolean::false;

}

if (_Value ==”Pakistan”)

{

_NotFound=boolean::false;

}

iterator.next();

}

return _NotFound;

}

{ 0 comments }

Material from Microsoft Dynamics Technical Conference 2015 is available for download.

This material contains,

  • Training manuals.
  • PDF,
  • Videos
  • Power point presentations
  • Hand on lab material.

https://mbs.microsoft.com/customersource/northamerica/AX/learning/presentations/AXTechConf15PresentationVideos

 

For visiting this linking you must have partner source or customer source credentials.

 

{ 0 comments }

Customer as offset account Dynamics Ax 2012 R3

February 23, 2015

During one of my customization, I have to transfer customer balance from one customer to another, for this purpose ledger entry for old customer as debit amount and other customer account set in offset account.   I used following code Snippet to achieve this functionality LedgerJournalCheckPost  jourCheckPost; LedgerJournalTable      jourTable;   AxLedgerJournalTable    header  = new AxLedgerJournalTable(); […]

Read the full article →

Exploring the message box in Dynamics Ax 2012 R3

February 22, 2015

Message box are common tools that helps us show messages, results and Provide choices to preform actions or not. Here are some messagebox with examples.     Info box : this is simple box used to display any message other than warnings or error messages.   static void JobInfoBox(Args _args) { info (“Hello world”);   […]

Read the full article →

Enable and Disable an Action Pane Button on grid row change Dynamics Ax 2012

February 18, 2015

This is very simple tip. That usually found that when we move record to record in list page, from top Action pane button enable or disable as result of this movement.  This functionality required one of my customization from. For example, I have to enable and disable button on action pane “BtnGenerateLine”  based on status […]

Read the full article →

Date in Advance filter Dynamics Ax 2012

February 7, 2015

Consider we are going to build a Inquiry form, where we are applying different filter criteria’s. One of them is date time filter. Consider this post is second part of one of my previous post. Where we created filter on Sales line. http://tech.alirazazaidi.com/how-to-create-a-custom-filter-on-list-or-inquiry-form-in-dynamics-ax-2012/   For this filter add two utcdatetimeEdit control and set auto declaration […]

Read the full article →

Custom lookup field with no exist join records dynamics Ax 2012

February 6, 2015

During customization I got requirement that in drop down or lookup shows those customer which did not have sales line. I handle this customization with the help of no exist join.  Code snippet is something like.     public void lookup() { Query query = new Query(); QueryBuildDataSource queryBuildDataSource, qbds, dsView; QueryBuildRange queryBuildRange;   SysTableLookup […]

Read the full article →

How to create a custom filter on list or inquiry form in Dynamics AX 2012

February 4, 2015

During development we have to create custom inquiry forms. Or Form where we can  search and filter records on different criteria. Consider a scenario, where we have to build custom inquiry form for all saleline. In this inquiry or custom list form, we can filter on records on date, customer and amount or discount. Lets […]

Read the full article →

Current language of client Dynamics Ax 2012

February 4, 2015

static void Job5(Args _args) { info(companyinfo::languageId()); }

Read the full article →