Skip to main content

Image stored in Dynamics Ax 2012 tables



In dynamics Ax 2012, You can read image from physical path and stored in database as follow

BinData binData = new BinData();
str extention, path, nameOfFile;
container imageContainer;
str imageFilePathName;
imageFilePathName=”C:\\abc\\ali.jpg”;
// if ( WinAPI::fileExists(imageFilePathName))
{
binData.loadFile(imageFilePathName);
imageContainer = binData.getData();
table.Person = _Party.RecId;
table.Image = imageContainer;
table.insert();

}

This code runs both for server side and client side. At server side execution table use winserverapi::FileExists 

Comments

Popular posts from this blog

Customization Tips for D365 for Finance and Operations How to configure Excel Add in D365 Finance and Operations August 1, 2021 by alirazazaidi I recorded how to configure Excel Addin for D365 finance and operations. How to configure Power BI out of the box dashboard on local VM Dynamics 365 for Finance and Operations July 17, 2021 by alirazazaidi Hi friends, here is video, which I recording during configuring Dynamics 365 Finance and operations out of the box dashboard on local VM. My session is held on Urdu Hindi User group on 1 August. For this I need to configure it. During development we need to configure these dashboards and some times we need to extend these dashboard. Hope this video will helpful to you. How hide SSRS Parameter RDP Menu Name Dynamics 365 Finance and Operations

  Again documentation class XYZUIBuilder extends SrsReportDataContractUIBuilder { public void build() { RecId hcmWorkerRecId; str name, menuItemName; FormBuildGroupControl grp; //Dialog dialogLocal = this.dialog(); XYZDC rdpContract = this.dataContractObject(); DialogField workerfieldDiff; DialogField _FromDate,_Todate; // Add the pay cycle field. menuItemName = this.controller().parmArgs().menuItemName(); workerfieldDiff = this.addDialogField(methodStr(XYZDC ,parmworkerrecid),rdpContract); // hcmWorkerRecId = HcmWorker::userId2Worker(curUserId()); if (menuItemName =="ESSReport") { workerfieldDiff.visible(false); workerfieldDiff.value(0); } _FromDate= this.addDialogField(methodStr(BEKenyaP9DC,parmFromDate),rdpContract); _Todate = this.addDialogField(methodStr(BEKenyaP9DC,parmToDate),rdpContract); } }

D365 : ENABLE AND DISABLE IN LIST PAGE

 here i have added 4 button in salesQuotationlistpage. now i need to enable/disable button according status. so i have Extensionof  of class SalesQuotationListPageInteraction and modify setButtonEnabled method by Chain of Command //list page button enable and diable in listpage interation class [ExtensionOf(classStr(SalesQuotationListPageInteraction))] final class SQTableinimathod_Extension {     protected void setButtonEnabled()     {                SalesQuotationTable SalesQuotationTable;         CustQuotationJour   CustQuotationJour;         CustQuotationConfirmJour  CustQuotationConfirmJour;               next setButtonEnabled();         SalesQuotationTable SalesQuotationTable1 = this.listPage().activeRecord(queryDataSourceStr(SalesQuotationListPage, SalesQuotationTable));         selec...

An error occurred during report data sets execution D365 For finance and operations

  Hi all, small tip. I faced this issue, when I extend the custom report in D365 for finance and operations. During development on onebox     Solution was simple, restart IIS services Restart Reporting Services. Happy Daxing.