Create a table with Container Datatype
IN form take a method getImage() write the following code.
_path = "Image path"
void getImage()
{
Bindata binData = new BinData();
FilePath _path;
ImageStore _ImageStore;
;
_path = "D:\India_flag.gif"; // file path
binData.loadFile(_path);
_ImageStore.ItemImage = binData.getData();
_ImageStore.doInsert();
}
__
take a button and call this method there:
void clicked()
{
super();
element.getImage();
ImageStore_ds.executeQuery();
}
This blog is for Dynamics AX (AXAPTA) Developers,this will help you for your development issues. This site contains some Microsoft Dynamics AX X++ Codes for use in your day to day use.
Subscribe to:
Post Comments (Atom)
Ledger Voucher creation Framework and x++ code to create ledger voucher
Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...
-
{ "Message" : "Please verify that the user is valid and set up correctly." } Sol: System Administration > Se...
-
Please click here to access Custom Workflow step by step process:
-
FormRun formRun = sender.formRun(); Object inventTrans_ds = formRun.dataSource(formDataSourceStr(InventMarking,InventTransO...
Hi I have a question
ReplyDelete_path = "D:\India_flag.gif"; // file path
binData.loadFile(_path);
those two lines, when i use like that i got error, it said that the file cannot open. I have tried _path = "D:\\India_flag.gif"; // file path works.
but when I get the file path from a table field (fielpath), then you get the path will be like
""D:\India_flag.gif"; // file path "!
btw: i use ax 2012
How can i solve it?