Thursday, 26 October 2017

How Disable Invoice and packing slip button in sales order process for form and list page based on the condition in Ax 2012 R3


SalesTableInteractionHelper  Class

Packing Slip

Method ..\ parmCanPackingslipBeUpdated
public boolean parmCanPackingslipBeUpdated()
{
#GetCached(
        canPackingslipBeUpdated,
        salesTableType.canPackingslipBeUpdated() && !(salesTable.SalesType == SalesType::Sales && salesTable.finalizeStatusOCP() == FinalizeStatusOCP::Open) && !(salesTable.wmsStatusOCP() == NoYes::Yes))
   
}

//info(strFmt("%1 -- %2",canInvoiceBeUpdated,(salesTableType.canInvoiceBeUpdated() && !(salesTable.SalesType == SalesType::Sales && salesTable.finalizeStatusOCP() == FinalizeStatusOCP::Open) && !(salesTable.wmsStatusOCP() == NoYes::Yes))));

Invoice

Method ..\ parmCanInvoiceBeUpdated
public boolean parmCanInvoiceBeUpdated()
{
              
#GetCached(
        canInvoiceBeUpdated,
        salesTableType.canInvoiceBeUpdated() && !(salesTable.SalesType == SalesType::Sales && salesTable.finalizeStatusOCP() == FinalizeStatusOCP::Open) && !(salesTable.wmsStatusOCP() == NoYes::Yes))
   

}

Wednesday, 18 October 2017

Table Extension Framework in Ax 2012 R3

Table Extension Framework

http://daxonline.org/9-table-extension-framework.html


Example
To Pack the table

BomReportFinish.updateBOMConsumption();



inventJournalTransExt = inventJournalTrans.inventJournalTransExt();
inventJournalTransExt.SendToWMS = Noyes::Yes;

inventJournalTrans.packInventJournalTransExt(inventJournalTransExt);

line num 91 : journalTransData.insert();