preloader-matrix

Alfasith

Upload image in to form / Application photo in Dynamic Ax

Hi,

// Use this below code in clicked method for your button placed in form.
str filename;
FileNameFilter filter = [‘JPG files’,’*.jpg’];
Bindata binData;
Image signatureImage = new Image();

super();

filename = Winapi::getOpenFileName(element.hWnd(), filter, ”, “Upload your image”, ”, ”);

binData = new BinData();

if (binData.loadFile(filename))
{
    signatureImage = binData.getData();
    WindowField.image(signatureImage); // WindowField – is the window field and make it auto declaration  : Yes
    WindowField.widthValue(signatureImage.width());
    WindowField.heightValue(signatureImage.height());
    element.resetSize();
    element.unLock();
}
Note:  this code stows the record but not stores the record in table.

Regards,

Leave a Reply

Your email address will not be published. Required fields are marked *