Tuesday, August 9, 2016

How to get Enum value in String for Query base view in Axapta

To get Enum value in String for Query base view in Axapta 2012 you can try below code sample for your method.

Here example will return label enum value you can use for name also.

 public static server str ItemType()  
 {  
   tableName viewName = identifierStr(ViewName);  
   DictEnum dictEnum = new DictEnum(enumNum(ItemType));  
   Map enumValues = new Map(Types::String, Types::String);  
   int n;  
   for (n = 0; n < dictEnum.values(); n++)  
   {  
   enumValues.insert(int2str(dictEnum.index2Value(n)),SysComputedColumn::returnLiteral(dictEnum.index2Label(n)));  
   }  
   return SysComputedColumn::switch( SysComputedColumn::returnField(viewName,  
   identifierStr(InventTable_1),  
   fieldStr(InventTable, ItemType)),  
   enumValues, SysComputedColumn::returnLiteral(dictEnum.index2Symbol(n)));  
 }  

Sunday, July 10, 2016

Purchase Order Invoice posting common Error in Ax 2012


Some times we face Purchase invoice creation and posting common error like blank invoice line,invoice no etc and its happen due to closing invoice form without invoicing .

To resolve that issue you need to do below steps.

Go To.
Path -> account payable -> Vendor invoice -> Pending vendor invoice


Select the vendor invoice then you can fill the information and try to post but if there is  incomplete data in invoice form and not posted than it can be stored in invoice history.

Path of invoice history form is as below.

Path -> account payable -> inquiries ->Invoice history and matching details

Filter the purchase order and delete it than  you can open vendor invoice and post without any problem.

Friday, July 8, 2016

Ax 2012 purchase order posting classes tables

Following are the Ax 2012 purchase order posting class on different stages of postings.

1. Purchase order confirmation- Class name -purchpurchorderjouranlcreate 

2.Purchase order reciptlist-Class name -purchreciptlistjournalpost

3. Purchase order packing slip or GRN-Class name -purchpackingslipjournalpost

4. Purchase order invoice-Class name -purchinvoicejournalpost

Above are posting class will hit while posting your purchase order with confirmation,receipt list,packing,invoice .

If you are facing any issue then you can put debug on required methods on above classes as per posting.

1.Tables Hits to store final Purchase order confirmation
 Purchpurchaseorderjour,purchpurchase order trans

2.Tables Hits to store final Purchase order GRN
Vendpackingslipjour and Vendpackingsliptrans

3.Tables Hits to store final Purchase order Invoice
Vendinvoicejour and vendInvoiceTrans

Wednesday, June 1, 2016

Insert Label by Code in Axapta in any language

To Insert Label by Code in Axapta in any language  you can try below code. This code will show you label code as output in message box.

 SysLabelEdit SysLabelEdit = new SysLabelEdit();  
   info(strFmt("%1", SysLabelEdit.labelInsert('En-US', 'Test Label', 'Test Label',
 SysLabelApplModule::None)));  

You can try this code to do label creation fast to save your time . I hope this really help you.

Monday, May 16, 2016

Purpose of batch jobs used in Axapta

1.Journalize finalized product receipts Batch job
Purpose of this batch job is to clear out receipt accrual balances when there is a difference between Purchase order receipt and Purchase order invoice.

2.Change based alerts Batch Job
When you set change base alert on field then notification generated on ax system for that activity of notification this job used.

3.Email distributor batch Job
Its used to send email,on which parameter set through alert and also used to send email notification for workflow.

Tuesday, May 10, 2016

Getting Management Reporter CU 7 Error during using syncing Ax 2012

Error Details:
We are not able to add new user in Management report and getting below error form integration log .


[ax 2012 companies to company] has encountered an error,processing will be aborted, Error text;A user being integrated could not be found on the specific domain

Solution: You can resolve above error by following steps.

1. Get list of Ax users .
2. Get list of domain users.
3. Compare users of Ax in Domain user and find that which user not present in domain if found the details then take further action.

You can create those users in domain to resolve this error or you can remove users in Ax which are not available in domain.

Sunday, May 8, 2016

Setup Source Version Control in Microsoft Dynamics AX 2012

1.First you need to open AOT and go to Version control parameter As Shown in below screen.

Version control parameter






























2.Then go to general table of Version control parameter form then select required parameters like Version control status,Version control system,repository folder etc

Version control status,Version control system,repository folder






















3. After that go to team foundation server tab in above screen and specify the url.

 team foundation server tab


























4.Then go to url then you can see Team room and specify further option in that url in browser.

Team room url



Friday, May 6, 2016

Menus Name for Ax 4.0

I am sharing here Menus name for Ax 4.0 standard. We know this version is outdated but when we started to search for some information on Ax 4.0 then did not get even lot of searching so I am sharing here to get it easily.

Ax 4



















Menu Name
General ledger
Bank
CRM
Accounts receivable
Accounts payable
Inventory management
Master planning
Production
Human Resources
Project
Basic
Administration

Monday, April 4, 2016

System getting hanged during software checklist in Ax 2012

Problem:

Do you have any ideas to solve with AX hanging when I start "Marge code automatically" in SOFTWARE UPDATE CHECKLIST
(It's just updating AX 2012 R2 to AX 2012 R2 CU7)
It's screenshot with stage on which I have hangs:
Checklist

Solution:

During checklist system generate log at database side . Need to check whether disk space is enough at the time of process.

Check Memory utilization at database side and AOS Side.

There should be enough RAM on database side.

Check kernal and application version it should be same.

Check batch group is attached in proper batch server.




Wednesday, March 30, 2016

Value in Table column getting blank during Excel import by code in Axapta

If you have written code to import data in Ax Table using Excel template and getting value blank in any column which is string type but value is mentioned in Excel column.

After checking that column value getting that number entered in string field and import code not able to pick number in string field  to handle that situation you need to write below code for particular field .

 switch(Cells.Item(Rownum, 11).value().variantType())  
 {  
   case COMVariantType::VT_BSTR:  
     accNo = strFmt("%1", Cells.Item(Rownum, 11).value().bStr());  
     break;  
   case COMVariantType::VT_DECIMAL, COMVariantType::VT_R4, COMVariantType::VT_R8:  
     accNo = strFmt("%1", any2int(Cells.Item(Rownum, 11).value().double()));  
     break;  
   case COMVariantType::VT_I1, COMVariantType::VT_I2, COMVariantType::VT_I4:  
     accNo = strFmt("%1", Cells.Item(Rownum, 11).value().int());  
     break;  
   case COMVariantType::VT_UI1, COMVariantType::VT_UI2, COMVariantType::VT_UI4:  
     accNo = strFmt("%1", Cells.Item(Rownum, 11).value().uLong());  
     break;  
    case COMVariantType::VT_EMPTY:  
     accNo = '';  
     break;  
   default:  
     throw error(strfmt('Unhandled variant type %1).', Cells.Item(Rownum, 11).value().variantType()));  
 }