Product transaction cycle from Creation of item to sales , purchase and on hand in Ax 2012

By viewing below clip you will able to know Product transaction cycle from Creation of item to sales and purchase and on hand physical in Ax 2012.

1. How to create Item in ax 2012 and assign item group, tracking dimension etc
2.Create, confirm and post-purchase order in the system.
3.Create, validate and post-movement journal in the system.
4.Create, confirm and post-sales order in the system.
5. On hand effect checking on the item on each process against inventory dimension.

Please visit and see the clip and subscribe on youtube to get more updates.


How to convert Amount in Accounting currency in Ax 2012

To convert Amount in Accounting currency in Ax 2012 you can take help of below code, first you need to find accounting currency then you can pass the value of currency using method calculatecurrencytocurrency .
Here an example to convert delivery remainder to accounting currency.

  Ledger         ledger;  
   Currencycode      accCurrency;  
   CurrencyExchangeHelper currencyExchangeHelper;  
   AmountMst        amountMST;  
   select ledger  
     where ledger.PrimaryForLegalEntity == CompanyInfo::findByCompany_IN(curext()).RecId;  
   accCurrency       = ledger.AccountingCurrency;  
   currencyExchangeHelper = CurrencyExchangeHelper::newExchangeDate(Ledger::current(), systemDateGet());  
   amountMST        = currencyExchangeHelper.calculateCurrencyToCurrency(this.CurrencyCode , accCurrency ,1 , true);  
   return this.SalesPrice * this.RemainSalesPhysical * amountMST;  

How to get Accounting Currency value for Company in Ax 2012

To get Accounting Currency value for Company in Ax 2012, you can try below code in the display method of the table.

 public display CurrencyCode AccountingCurrency()  
 {  
   Ledger ledger;  
   select ledger  
     where ledger.RecId == CompanyInfo::find().RecId;  
   return ledger.AccountingCurrency;  
 }  

Auto Submit Workflow for Approval in Ax 2012

Sometimes we need to submit Auto Submit Workflow for Approval in Ax 2012 then you can try below code by job. One thing you need to remember submitter should not be approval in workflow designer if its then this job may create some issue on approval.

Rest is fine you can use this code for your customization.


 Inventtable inventtable =InventTable::find("628034tr1");  
 Workflow::activateFromWorkflowType("InventApprWFType", //Template name  
 inventtable.RecId, //Record id of the document that you are submitting,  
 'Auto-Submitted into workflow', //A comment for the workflow history to know something about how this was submitted,  
 false,//This document wasn't submitted from the web,  
 'userid1'); // T  
   info("done");  

X++ code for Project Item Requirement posting in Ax 2012

Below is the X++ code for Project Item Requirement posting in Ax 2012.

  SalesFormLetter salesFormLetter;  
   salesTable Salestablelocal;  
   str 200 msg;  
   if(this.parmSalesid())  
   {  
     changeCompany(_legalentity)  
     {  
       select Salestablelocal  
         where Salestablelocal.Salesid ==this.parmSalesid()  
           && Salestablelocal.salestype==SalesType::ItemReq  
           && Salestablelocal.SalesStatus==SalesStatus::Backorder;  
       if(Salestablelocal)  
       {  
         ttsBegin;  
           salesFormLetter = SalesFormLetter::construct(DocumentStatus::Confirmation);  
           salesFormLetter.update(Salestablelocal);  
           salesFormLetter = SalesFormLetter::construct(DocumentStatus::ProjectPackingSlip);  
           salesFormLetter.update(Salestablelocal);  
         ttsCommit;  
           msg = "Item Requirement with Sales order id : " + this.parmSalesid() + " Posted ";  
       }  
       else  
       {  
           msg = "Item Requirement with Sales order id: "+ this.parmSalesid() + " already posted";  
       }  
     }  
   }  
   else  
   {  
      msg = "Item Requirement with provided Sales order id does not exists";  
   }  

Seeking help to get Miscellaneous charges for Purchase order in Ax 2012

If you are Seeking help to get Miscellaneous charges for the Purchase order in Ax 2012 then this code can help you.

Sometimes we need to display Miscellaneous charges total in the report then you can get help as per below code.

  while select sum(Value),MarkupCode from markuptrans_txt group by MarkupCode join purchline where purchline.RecId ==markuptrans_txt.TransRecId  
                                     && markuptrans_txt.TransTableId == purchline.tableid  
                                     && purchline.PurchId == vendPurchOrderJour.PurchId  
                                     && markuptrans_txt.Value != 0.00  
   {  
     purchPurchaseOrderHeader.MiscChargeDesc = purchPurchaseOrderHeader.MiscChargeDesc+strFmt("Add %1 : \n",MarkupTable::find(MarkupModuleType::Vend,markuptrans_txt.MarkupCode).Txt )  
    ;  

Get particular Financial dimension value from default dimension in Axapta

To get particular dimension value from default dimension you can try below code as per your requirement.

  DimensionAttributeValueSetItem dimvalue;  
   DimensionAttributeValue dimAttValue;  
   DimensionAttribute dimAtt;  
   int length;  
   //DimAttributeOMCostCenter  viewCostCenter;  
   DimensionFinancialTag    viewCostCenter;  
   DimAttributeOMDepartment  viewDepartment;  
   DimensionFinancialTag    locations;  
   str name;  
   ;  
   length = 0;  
   Select dimvalue  
   join dimAttValue  
   join dimAtt  
   Where dimvalue.DimensionAttributeValueSet == _DimensionDefault  
   && dimvalue.DimensionAttributeValue == dimAttValue.RecId  
   && dimAttValue.DimensionAttribute == dimAtt.RecId  
   && dimAtt.Name == 'ProductCategory';  
   select viewCostCenter  
   where viewCostCenter.Value == dimValue.DisplayValue;  
   return viewCostCenter.Description;  

Import Budget Register line In Ax 2012

To Import Budget Register line In Ax 2012, you get Idea from below code. You need to create budget register header then you can your CSV file and apply the code to import. you also need to declare variables as used in below code.

            budgetTransactionLine = new AxBudgetTransactionLine();  
         budgetTransactionLine.parmBudgetTransactionHeader(BudgetTransactionHeader::findByTransactionNumber(c1,Ledger::current()).RecId);  
         budgetTransactionLine.parmDate(str2Date(c2,123));  
         budgetTransactionLine.parmTransactionCurrency(c10);  
         budgetTransactionLine.parmBudgetType(str2enum(budgetType,c11));  
         budgetTransactionLine.parmTransactionCurrencyAmount(str2num(c9));  
         budgetTransactionLine.parmAccountingCurrencyAmount(str2num(c9));  
         accEntryPattern = [strFmt("%1-%2-%3-%4-%5-%6-%7",c3,c4,c5,c6,c7,c8),c3];  
             if(c4)  
             {  
               accEntryPattern += "LegalEntity";  
               accEntryPattern += c4;  
               dimcount++;  
             }  
             if(c5)  
             {  
               accEntryPattern += "Region";  
               accEntryPattern += c5;  
               dimcount++;  
             }  
             if(c6)  
             {  
               accEntryPattern += "BusinessUnit";  
               accEntryPattern += c6;  
               dimcount++;  
             }  
              if(c7)  
             {  
               accEntryPattern += "Activity";  
               accEntryPattern += c7;  
               dimcount++;  
             }  
             if(c8)  
             {  
               accEntryPattern += "Department";  
               accEntryPattern += c8;  
               dimcount++;  
             }  
         accEntryPattern = conIns(accEntryPattern,3,dimcount);  
         budgetTransactionLine.parmLedgerDimension(AxdDimensionUtil::getLedgerAccountId(accEntryPattern));  
         budgetTransactionLine.save();  

Class and method to post packing slip for all load form in ax 2012

In warehouse management In Ax 2012, All loads form exists and load can be created from purchase orders and you can post packing slip from load form.

If you have any customization during packing slip posting then you can refer below class method to put your code.

\Classes\WHSPostPackingSlip\runPackingSlip

If you want to update anything in vendPackingSlipJour and vendPackingSlipTrans table during packing slip posting. Then you can refer below class.

\Classes\PurchPackingSlipJournalCreate

Happy daxing.

Microsoft Windows : Understanding Control panel features and system settings


I want to share one interesting clip from Youtube which will show you Control panel features and settings for  Windows operating system.



If you like this clip then waiting for your subscription to get daily updates on new topics.



Important thing to learn in Project Management Module in Axapta

I am sharing here one Important thing to learn in Project Management Module in Axapta.

Please watch this clip to learn free and subscribe to learn more.



AX 2012 Project types and Time & Material cycle.
We are discussing here all the  Project types available AX 2012.
This is  Microsoft Dynamics AX 2012 Demo for Project Management and Accounting concepts for Project types.

Ax 2012 Item master fields and Item Model Group understanding

Sharing Information for Ax 2012 Item master fields and Item Model Group understanding 

I am sharing information of  clip which will show you Ax 2012 Item Master product Product Master, CW Catch weight Business Examples.Difference between item type service and Item, Product and product master, Element of items like name, search name etc ar properties of product in Axapta.
Item master fields



Item Model Group understanding 


I want to share clip which will show you Ax 2012 Item Model Group properties and its  fields detail

Path of Model group  in Ax 2012 is  as below

Inventory management  Setup -Inventory - Item model groups.

Other Important Inventory model things are as follows:
FIFO
LIFO
LIFO date
Weighted avg.
Weighted avg. date
Standard cost
Moving average


And other field related to Item Model Group.

InclPhysicalValueInCost
InventModel
InventModelSecCur_RU
MandatoryDeduct
MandatoryPick
MandatoryReceive
MandatoryRegister
MandatoryWMSOrder
MCRReservation
ModelGroupId
MonthlyAverageCost_CN
Name
NegativeFinancial
NegativePhysical
PdsCheck
PdsConsReq
PdsDispositionCode
PdsPickCriteria
PdsReqVendBatchDetail
PdsSameLot
PdsVendorCheckItem
PostOnhandFinancial
PostOnhandFinancialSecCur_RU
PostOnhandPhysical
PostPhysicalPurchase
PostPhysicalRevenue
QuarantineControl
ReserveByDate
ReserveReversed
StandardCost
StockedProduct