Mindbrations: AX2012 - How to control the visibility of FactBox on form thru X++: "AX2012 - How to control the visibility of FactBox on form thru X++"
'via Blog this'
Tuesday, November 6, 2012
Wednesday, October 24, 2012
Print Main Menu
Question: How can i print all elements of a main menu.
Answer: Use the following job,
static void menuPrint(Args _args)
{
SysDictMenu menu;
SysExcelWorksheetHelper worksheetHelper;
SysExcelHelper sysExcelHelper;
SysExcelWorksheet worksheet;
str menuToPrint;
str worksheetName;
int currentRow = 1;
str fileName;
str path;
void reportLevel(SysDictMenu _sysDictMenu)
{
SysMenuEnumerator enumerator;
if(_sysDictMenu.isMenuReference() || _sysDictMenu.isMenu())
{
path += _sysDictMenu.label() + "//";
enumerator = _sysDictMenu.getEnumerator();
while (enumerator.moveNext())
{
reportLevel(enumerator.current());
}
}
else
{ currentRow ++;
worksheetHelper.setCellValue(2, currentRow, _sysDictMenu.label());
path = "";
}
}
;
sysExcelHelper = SysExcelHelper::construct();
sysExcelHelper.initialize();
menuToPrint = 'Roster';
worksheetName = menuToPrint;
worksheet = sysExcelHelper.addWorksheet(worksheetName);
worksheetHelper = SysExcelWorksheetHelper::construct(worksheet);
// Populate the header row with the appropriate field labels and format the columns
worksheetHelper.addColumn(1, "Path", Types::String);
worksheetHelper.addColumn(2, "Item", Types::String);
worksheetHelper.addColumn(3, "Status", Types::String);
worksheetHelper.addColumn(4, "Assigned To", Types::String);
worksheetHelper.addColumn(5, "Notes", Types::String);
reportLevel(SysDictMenu::newMenuName(MenuStr(Roster)));
worksheetHelper.autoFitColumns();
worksheetHelper.formatWorksheetTableStyle(sysExcelHelper.getOfficeVersion());
// Generate the file using the current UTC date time (without the ‘:’ character)
// since it is not allowed for file names.
fileName = "C:\\Windows\\Temp\\ExportToExcel.xlsx";
sysExcelHelper.save(filename);
sysExcelHelper.launchExcel();
Answer: Use the following job,
static void menuPrint(Args _args)
{
SysDictMenu menu;
SysExcelWorksheetHelper worksheetHelper;
SysExcelHelper sysExcelHelper;
SysExcelWorksheet worksheet;
str menuToPrint;
str worksheetName;
int currentRow = 1;
str fileName;
str path;
void reportLevel(SysDictMenu _sysDictMenu)
{
SysMenuEnumerator enumerator;
if(_sysDictMenu.isMenuReference() || _sysDictMenu.isMenu())
{
path += _sysDictMenu.label() + "//";
enumerator = _sysDictMenu.getEnumerator();
while (enumerator.moveNext())
{
reportLevel(enumerator.current());
}
}
else
{ currentRow ++;
worksheetHelper.setCellValue(2, currentRow, _sysDictMenu.label());
path = "";
}
}
;
sysExcelHelper = SysExcelHelper::construct();
sysExcelHelper.initialize();
menuToPrint = 'Roster';
worksheetName = menuToPrint;
worksheet = sysExcelHelper.addWorksheet(worksheetName);
worksheetHelper = SysExcelWorksheetHelper::construct(worksheet);
// Populate the header row with the appropriate field labels and format the columns
worksheetHelper.addColumn(1, "Path", Types::String);
worksheetHelper.addColumn(2, "Item", Types::String);
worksheetHelper.addColumn(3, "Status", Types::String);
worksheetHelper.addColumn(4, "Assigned To", Types::String);
worksheetHelper.addColumn(5, "Notes", Types::String);
reportLevel(SysDictMenu::newMenuName(MenuStr(Roster)));
worksheetHelper.autoFitColumns();
worksheetHelper.formatWorksheetTableStyle(sysExcelHelper.getOfficeVersion());
// Generate the file using the current UTC date time (without the ‘:’ character)
// since it is not allowed for file names.
fileName = "C:\\Windows\\Temp\\ExportToExcel.xlsx";
sysExcelHelper.save(filename);
sysExcelHelper.launchExcel();
}
Tuesday, August 28, 2012
Read / Write Files from document handling
Question:
How can you read / writes files from document handling?
Answer:
How can you read / writes files from document handling?
Answer:
void fromFolderToDB(FilePath _path)
{
System.IO.DirectoryInfo dir = new
System.IO.DirectoryInfo(_path);
System.IO.FileInfo[] files;
System.IO.FileInfo curFile;
System.Collections.IEnumerator enumerator;
{
System.IO.DirectoryInfo dir = new
System.IO.DirectoryInfo(_path);
System.IO.FileInfo[] files;
System.IO.FileInfo curFile;
System.Collections.IEnumerator enumerator;
BinData binData;
DocuValue docuValue;
;
files = dir.GetFiles(_path);
enumerator = files.GetEnumerator();
while (enumerator.MoveNext())
{
curFile = enumerator.get_Current();
files = dir.GetFiles(_path);
enumerator = files.GetEnumerator();
while (enumerator.MoveNext())
{
curFile = enumerator.get_Current();
docuValue.clear();
binData.loadFile(curFile.get_FullName()); // get file content
docuValue.File = binData.getData();
docuValue.FileName = curFile.get_Name();
docuValue.insert(); // insert into DB
}
}
docuValue.FileName = curFile.get_Name();
docuValue.insert(); // insert into DB
}
}
void fromDBToFolder(FilePath _path)
{
BinData binData;
DocuValue docuValue;
{
BinData binData;
DocuValue docuValue;
;
while select docuValue // load From DB
{
binData.setData(docuValue.File);
binData.saveFile(docuValue.FileName); // insert into file system
}
}
while select docuValue // load From DB
{
binData.setData(docuValue.File);
binData.saveFile(docuValue.FileName); // insert into file system
}
}
Make attention to CodeAccessPermission when reading/writing to file system
and when using CLR inside X++
and when using CLR inside X++
Monday, August 27, 2012
Error "Cannot access a disposed object" when deploying AX 2009 Enterprise Portal on a SharePoint 2010 server - Microsoft Dynamics AX Technical Support Blog - Site Home - MSDN Blogs
Error "Cannot access a disposed object" when deploying AX 2009 Enterprise Portal on a SharePoint 2010 server - Microsoft Dynamics AX Technical Support Blog - Site Home - MSDN Blogs:
'via Blog this'
'via Blog this'
Monday, August 13, 2012
CAL License or Server License for SQL Server in AX Environment
Question
Should we use CAL based licensing or server based licensing for SQL Server in AX Environment?
Answer
Please read the link from here.
Should we use CAL based licensing or server based licensing for SQL Server in AX Environment?
Answer
Please read the link from here.
Wednesday, August 1, 2012
Matching Invoices to Portions of a Packing Slip
Question
Is there any way to find out invoices corresponding to individual packing slips
Answer
There is a link between InventTrans, CustInvoiceJourn and CustPackingSlipJour. This can be used to get the desired result. Also read this document.
Links
http://www.microsoft.com/en-us/download/details.aspx?id=23769
Is there any way to find out invoices corresponding to individual packing slips
Answer
There is a link between InventTrans, CustInvoiceJourn and CustPackingSlipJour. This can be used to get the desired result. Also read this document.
Links
http://www.microsoft.com/en-us/download/details.aspx?id=23769
Thursday, July 26, 2012
Sending email through outlook in Dynamics AX
Question:
How can i send an email in AX through outlook?
Answer:
static void OutlookEmail(Args _args)
{
SmmOutlookEmail smmOutlookEmail = new SmmOutlookEmail();
;
if (smmOutlookEmail.createMailItem())
{
smmOutlookEmail.addEMailRecipient('asamad@moorestephens.com.au');
smmOutlookEmail.addSubject("Test");
smmOutlookEmail.isHTML(true);
smmOutlookEmail.addBodyText('Test');
smmOutlookEmail.sendEMail(smmSaveCopyofEmail::No);
}
}
How can i send an email in AX through outlook?
Answer:
static void OutlookEmail(Args _args)
{
SmmOutlookEmail smmOutlookEmail = new SmmOutlookEmail();
;
if (smmOutlookEmail.createMailItem())
{
smmOutlookEmail.addEMailRecipient('asamad@moorestephens.com.au');
smmOutlookEmail.addSubject("Test");
smmOutlookEmail.isHTML(true);
smmOutlookEmail.addBodyText('Test');
smmOutlookEmail.sendEMail(smmSaveCopyofEmail::No);
}
}
Tuesday, July 24, 2012
Dynamics AX (2009 & 2012): How to get On-Hand inventory of past years (by date)
Dynamics AX (2009 & 2012): How to get On-Hand inventory of past years (by date): "How to get On-Hand inventory of past years (by date)"
'via Blog this'
'via Blog this'
Monday, July 23, 2012
Re: AXADOMD is not installed error. - Microsoft Dynamics AX Forum - Microsoft Dynamics AX - Microsoft Dynamics Community
Re: AXADOMD is not installed error. - Microsoft Dynamics AX Forum - Microsoft Dynamics AX - Microsoft Dynamics Community: "AXADOMD is not installed error"
'via Blog this'
'via Blog this'
Sunday, July 22, 2012
David Sandor | SOLVED: You must install SQL Server 2005 Analysis Services with Service Pack 2 or higher before installing the Analysis extensions.
David Sandor | SOLVED: You must install SQL Server 2005 Analysis Services with Service Pack 2 or higher before installing the Analysis extensions.: "You must install SQL Server 2005 Analysis Services with Service Pack 2 or higher before installing the Analysis extensions."
'via Blog this'
'via Blog this'
Subscribe to:
Posts (Atom)