DAXSPOT

Wednesday, June 17, 2020

New line in ssrs report function, expression

Hi,

In SSRS report, to give a new line in between words then we can use vbCrLf.

Example:

“Signature” + space(2) + “________________________________________” + vbCrLf + “Owner.”

Tuesday, June 16, 2020

Data flow to Invoice Screen while Sales Order Invoicing

Hi,

If you want to know how the data flows to Invoice Screen while Sales Order Invoicing. 
Look into Class "SalesFormletterParmData".

This class process data from SalesOrder to SalesParmTable, which displays while invoicing a SO.

InventItemSalesSetup Table Record Ax 2009

Hello,

I was facing issue in getting InventItemSalesSetup Record in Ax 2009. After few hours of effort, i succeeded in it.

This code below will get you the exact InventItemSalesSetup Record.

//Parm DimId and ItemId
InventItemSalesSetup        InventItemSalesSetup;
InventDim                   InventDim, inventDimSelect;

select inventDimSelect
    where inventDimSelect.inventDimId == _dimId;

select inventItemSalesSetup
    where   InventItemSalesSetup.ItemId         ==  _itemId
    join inventDim
    where inventDim.inventDimId == inventItemSalesSetup.InventDimId
    && inventDim.InventColorId == inventDimSelect.InventColorId
    && inventDim.InventSizeId == inventDimSelect.InventSizeId
    && inventDim.ConfigId == inventDimSelect.configId;

Import from excel and create Multiple Sales Order with Multiple Lines in ax 2012

Hi,
Below code will help to Import and create Multiple Sales Order with Multiple Lines in ax 2012.
This has some reference from other blogs.
SalesTable salesTable;
SalesLine salesLine; InventDim inventDim; NumberSeq num; SysExcelApplication application; SysExcelWorkbooks workbooks; SysExcelWorkbook workbook; SysExcelWorksheets worksheets; SysExcelWorksheet worksheet,worksheet1; SysExcelCells cells,cells1; COMVariantType type,type1; int row=1,row1=1; ; application = SysExcelApplication::construct(); workbooks = application.workbooks(); workbooks.open('File Path \\SalesOrderCreate.xlsx'); workbook = workbooks.item(1); worksheets = workbook.worksheets(); worksheet = worksheets.itemFromName("Header"); //Worksheet with name "Header" worksheet1 = worksheets.itemFromName("Lines"); cells = worksheet.cells(); cells1 = worksheet1.cells(); ttsBegin; do { row1++; salesTable.clear(); num = NumberSeq::newGetNum(SalesParameters::numRefSalesId()); salesTable.SalesId = num.num(); salesTable.CustAccount = cells.item(row1,1).value().bStr(); salesTable.initValue(SalesType::Sales); salesTable.initFromCustTable(); salesTable.insert(); do { row++; if( salesTable.CustAccount == cells1.item(row, 1).value().bStr()) { inventDim.clear(); inventDim.InventSiteId = cells1.item(row,5).value().bStr();//int2str(real2int(cells1.item(row,5).value().double())); inventDim.InventLocationId = cells1.item(row,6).value().bstr();//int2str(real2int(cells1.item(row,6).value().double())); salesLine.clear(); salesLine.initValue(salesTable.SalesType); salesLine.initFromSalesTable(salesTable); salesLine.ItemId = cells1.item(row, 2).value().bStr(); salesLine.initFromInventTable(InventTable::find(cells1.item(row, 2).value().bStr())); salesLine.InventDimId = InventDim::findOrCreate(inventDim).inventDimId; salesLine.SalesQty = any2int(cells1.item(row,3).value().toString()); salesLine.RemainSalesPhysical = salesLine.SalesQty; salesLine.SalesUnit = cells1.item(row,4).value().bStr(); salesLine.DlvMode = cells1.item(row,7).value().bStr(); salesLine.QtyOrdered = salesLine.calcQtyOrdered(); salesLine.RemainInventPhysical = salesLine.QtyOrdered; salesLine.setPriceDisc(InventDim::find(salesLine.InventDimId)); if (salesLine.validateWrite()) { salesLine.insert(); } } type = cells1.item(row+1, 1).value().variantType(); } while (type != COMVariantType::VT_EMPTY); row = 0; type1 = cells.item(row1+1, 1).value().variantType(); } while(type1 != COMVariantType::VT_EMPTY); workbooks.close(); application.quit(); info("Done!"); ttsCommit;

How to execute SQL directly form Dynamics AX X++

How to execute Sql directly form Dynamics AX X++ Reference by : alirazazaidi Dynamics Ax provide many other ways to communicate with databas...