Wednesday, March 29, 2017

How to Convert column values for filter purpose in axapta

Some times you need to filter some records in MSD Axapta grid but its take time to get vertical column values with comma separated values

This is simple example to understand How to take vertical column values to horizontal with Comma separated values.

for example values in vertical column is like this way

1
2
3
4
5
6
7
8
9
10

You need To convert it on this way for record filter purpose

1,2,3,4,5,6,7,8,9,10,



This clip will show you above scenario solution.



Hope you got this tricks. Thanks for watching.. if you like it please subscribe.

Thursday, March 9, 2017

Code to get Ledger Account balance in Axapta 2012

To get Ledger Account balance in Axapta 2012 You can try below code. This code can be try out at any new job in AOT.
This code output will be for single ledger but if you want to get all ledger balance then you can use while select loop instead of select.

 MainAccount     mainAccount;  
   select mainAccount where mainAccount.MainAccountId     == '1454542' &&  
                mainAccount.LedgerChartOfAccounts == LedgerChartOfAccounts::current();  
   info(strFmt("%1",mainAccount.getBalance(dateNull(), systemDateGet(), FiscalPeriodType::Opening, OperationsTax::Current)));  

Code to get Employee Name For all employee in Ax 2012

 To get Employee Name For all employee in Ax 2012 You can get idea from below code.

 DirPerson        dirPerson;  
   HcmWorker        hcmWorker;  
   HRMDailyAttendance   hrmDailyAttendence;  
   ;  
    while select Name ,gender from dirPerson  
    join hcmWorker  
      group by dirPerson.Name,dirPerson.Gender  
     where hcmWorker.Person == dirPerson.RecId  
     
      {  
      info(strFmt("%1",dirPerson.Name));  
   }  

Sunday, March 5, 2017

Batch jobs setting with Workflow infrastructure configuration wizard in ax 2012


Following step need to set for administration point of view for workflow steps and setting.



1. Click Area Page node: System administration -> Setup -> Batch group.


Form name: Batch group


Workflow batch job

2. Switch to the Batch servers tab on the Batch group form and check whether server is added to batch group or not.


3. Click the Close toolbar button.


4. Close the Batch group form.


5. Click Area Page node: System administration -> Setup -> System -> Server configuration.


Form name: Server configuration

6. Click the Close toolbar button.


7. check server name and Close the Server configuration form.


8. Click Area Page node: System administration -> Setup -> System -> System service accounts.


Check the service accounts.


13. Click Area Page node: System administration -> Setup -> Workflow -> Workflow infrastructure configuration.


Form name: Workflow infrastructure configuration wizard


Workflow batch job

14. Click the Next > button.


15. Switch to the Configure the workflow message processing batch job tab on the Workflow infrastructure configuration wizard form.


Workflow batch job

16. Click the Next > button.


17. Switch to the Configure the workflow due date processing batch job tab on the Workflow infrastructure configuration wizard form.


Workflow batch job

18. Click the Next > button.


19. Switch to the Configure the line-item workflow notifications batch job tab on the Workflow infrastructure configuration wizard form.


Workflow batch job

19. Change Repeat job after the specified number of minutes from '30' to '3'.


21. Click the Next > button.


22. Switch to the Completing the workflow infrastructure configuration wizard tab on the Workflow infrastructure configuration wizard form.



23. Click the Finish button.


24. Close the Workflow infrastructure configuration wizard form.


25. Click Area Page node: System administration -> Inquiries -> Batch jobs -> Batch jobs.


Form name: Batch job


Workflow batch job



32. Click the Recurrence button.


Form name: Recurrence


Workflow batch job


Form name: Recurrence


Reccurence

35. Change Count from '1' to '4'.


37. Click the OK button.




38. Click the Close button.

How to set recurrence for batch job in ax 2012





Step 1: (‎05-‎Mar-‎17 12:42:41 PM) User left click on "Microsoft Dynamics AX 2012 (menu item)"




Step 2: (‎05-‎Mar-‎17 12:42:43 PM) User left click on MSD‬ [‎‪xyz‬‪: ‎‪Session ID‬ - ‎‪3‬‬]‎ - ‎ [‎‪1‬ - ‎‪usmf‬ - ‎‪initial‬]‎ (list item)"
screenshot0002.JPEG



Step 3: (‎05-‎Mar-‎17 12:42:45 PM) User left click on "BatchJob (link)" in test‬ [‎‪xyz‬‪: ‎‪Session ID‬ - ‎‪3‬‬]‎ - ‎ [‎‪1‬ - ‎‪usmf‬ - ‎‪initial‬]‎"
screenshot0003.JPEG



Step 4: (‎05-‎Mar-‎17 12:42:47 PM) User mouse drag start on "‪Batch job‬ (‎‪1‬)‎‪ - ‎‪‪‪Job description‬: ‎‪Change based alerts‬‬, ‎‪‪Withhold‬‬‬, ‎‪Partition Key: initial‬‬ (window)" in "‪Batch job‬ (‎‪1‬)‎‪ - ‎‪‪‪Job description‬: ‎‪Change based alerts‬‬, ‎‪‪Withhold‬‬‬, ‎‪Partition Key: initial‬‬"
screenshot0004.JPEG


Previous Next
Step 5: (‎05-‎Mar-‎17 12:42:48 PM) User mouse drag end on "‪Batch job‬ (‎‪1‬)‎‪ - ‎‪‪‪Job description‬: ‎‪Change based alerts‬‬, ‎‪‪Withhold‬‬‬, ‎‪Partition Key: initial‬‬ (window)" in "‪Batch job‬ (‎‪1‬)‎‪ - ‎‪‪‪Job description‬: ‎‪Change based alerts‬‬, ‎‪‪Withhold‬‬‬, ‎‪Partition Key: initial‬‬"
screenshot0005.JPEG



Step 6: (‎05-‎Mar-‎17 12:42:50 PM) User left click on "Functions (menu item)" in "‪Batch job‬ (‎‪1‬)‎‪ - ‎‪‪‪Job description‬: ‎‪Change based alerts‬‬, ‎‪‪Withhold‬‬‬, ‎‪Partition Key: initial‬‬"
screenshot0006.JPEG



Step 7: (‎05-‎Mar-‎17 12:42:52 PM) User left click in "‪Batch job‬ (‎‪1‬)‎‪ - ‎‪‪‪Job description‬: ‎‪Change based alerts‬‬, ‎‪‪Withhold‬‬‬, ‎‪Partition Key: initial‬‬"
screenshot0007.JPEG
Step 8: (‎05-‎Mar-‎17 12:42:53 PM) User keyboard input in "‪Batch job‬ (‎‪1‬)‎‪ - ‎‪‪‪Job description‬: ‎‪Change based alerts‬‬, ‎‪‪Withhold‬‬‬, ‎‪Partition Key: initial‬‬" [... Enter]
screenshot0008.JPEG


Previous Next
Step 9: (‎05-‎Mar-‎17 12:42:56 PM) User left click on "Functions (menu item)" in "‪Batch job‬ (‎‪1‬)‎‪ - ‎‪‪‪Job description‬: ‎‪Workflow message processing‬‬, ‎‪‪Executing‬‬‬‬"
screenshot0009.JPEG



Step 10: (‎05-‎Mar-‎17 12:43:00 PM) User left click on "Remove recurrence (menu item)"
screenshot0010.JPEG


Previous Next
Step 11: (‎05-‎Mar-‎17 12:43:02 PM) User left click on "Recurrence (menu item)" in "‪Batch job‬ (‎‪1‬)‎‪ - ‎‪‪‪Job description‬: ‎‪Workflow message processing‬‬, ‎‪‪Executing‬‬‬‬"
screenshot0011.JPEG



Step 12: (‎05-‎Mar-‎17 12:43:05 PM) User left click in "‪Recurrence‬ (‎‪1‬)‎"
screenshot0012.JPEG


Previous Next
Step 13: (‎05-‎Mar-‎17 12:43:07 PM) User mouse drag start in "‪Recurrence‬ (‎‪1‬)‎"
screenshot0013.JPEG



Step 14: (‎05-‎Mar-‎17 12:43:07 PM) User mouse drag end in "‪Recurrence‬ (‎‪1‬)‎"
screenshot0014.JPEG


Previous Next
Step 15: (‎05-‎Mar-‎17 12:43:08 PM) User keyboard input in "‪Recurrence‬ (‎‪1‬)‎" [...]
screenshot0015.JPEG



Step 16: (‎05-‎Mar-‎17 12:43:09 PM) User left click on "OK (button)" in "‪Recurrence‬ (‎‪1‬)‎"
screenshot0016.JPEG



Step 17: (‎05-‎Mar-‎17 12:43:12 PM) User left click on "Memory (edit)" in "‪Recurrence‬ (‎‪1‬)‎"
screenshot0017.JPEG


Previous Next
Step 18: (‎05-‎Mar-‎17 12:43:25 PM) User left click in "‪Recurrence‬ (‎‪1‬)‎"
screenshot0018.JPEG