Category Archives: D365 Finance and Operations
Deploy SSRS reports through Windows Powershell in Dynamics 365 Finance and Operations
Introduction:In this blog, we will see how to deploy SSRS reports in Microsoft Dynamics 365 Finance and Operations Solution: For on-prem environment, we will open Windows PowerShell in administrator mode and run the below scrip step by step. cd C:\AOSService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\ .\DeployAllReportsToSsrs.ps1 For online Cloudhosted/Dev environment, we will run below mentioned script cd k:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\ .\DeployAllReportsToSSRS.ps1 -PackageInstallLocation “k:\AosService\PackagesLocalDirectory” It appears as When deploying reports are completed, It looks like Thanks for reading !!!
Share Story :
Item Master Data Mass uploading via Data Management in Dynamics 365 Finance and Operations
Item Master Data Mass uploading via Data Management In the world of data management, it has become essential that the business users are provided solution for mass data uploading. Where the data is managed by very less expert users who’re required to upload and download data in bulk at very less given time. Today I am going to show you the way to upload Item Master Data quickly and with no errors via Data Management in MS Dynamics Commerce and Retail. Note: Masters as Item group, tax codes, units, category, item model group etc should be pre-configured or created for this to work accurately otherwise this operation will fail with errors as the masters are not created/configured. For this operation to work first we need to identify the fields that are required to do two steps. First, Item Master Creation Secondly, Item Master release in released products. So now to identify the necessary “importable” fields first we will export the required fields in excel as below. Goto Workspaces> Data Management and in Data Management click Export Button. Upon Clicking “export” create project as data filled in below. Desired Project name in my case I have named it “product master fields” Generate Data package to be set as No. Now when project is created click on “add entity” Select entity as “Released product creation V2” or anything as “Released product creation” whichever is latest according to your version of D365. Select output as “EXCEL”. Use sample file and skip staging to be set as NO. Very important step to select fields to be set as “Importable Fields” And “add” the entity to the project. Now again click on “add Entity”, select the rest of the fields as mentioned in pt. II., and select “released products V2) in entity name and click on add. Now click on export button as below Now on export screen Click on “refresh” button until you see mark on thee screen, and then “download File” to obtain excel file. Note: click each project one by one to download table fields. After downloading file replace the data with required information that you want in your product master so that we can Import the Master data. (Note: You can hide fields that doesn’t require user to input any data but are required by AX this you will identify in released products format). Assuming that you have created your files for upload we will now continue with “Import” data, Goto Workspaces > Data Management and in Data Management click “Import” Button. Upon clicking “Import” create a project and add entity as below. Add group name, in my case added as “import Master Data” Now when project is created click on “add File” Select entity as “Released product creation V2” or anything as “Released product creation” whichever is latest according to your version of D365. Click the upload data file and select the appropriate file, in my case it is “Released product creation V2 – Format.xlsx” Select “Source data format” Click close. Now again click on “add File”, select the rest of the fields as mentioned in pt. VIII., and select “released products V2) in entity name and click on Close. After adding both the files, now its time to click on “import”, but first ensure that the sequence of the below files are as such 1st for Released Product Creation and 2nd for Released products. If this is not in sequence the above operation will fail. After Clicking on Import, you will have to click on refresh button until the come. Upon success you can see the validation message that the master data has been uploaded successfully and released the product for use. In my case I had uploaded a test product which got successfully uploaded to the system. Hope this helps!
Share Story :
Your connection is not private | NET::ERR_CERT_DATE_INVALID Error in D365 Finance and Operations
As seen in title when error “Your connection is not private | NET::ERR_CERT_DATE_INVALID” occured which seems as follows in screenshot when you try to open environment link in browser. The reason for above error in my case was that SSL certificate was expired as you can see in following screenshot To solve this issue go to your lcs.dynamics.com with your credentials and open your project now select which ever environment and visit see details/Full details page and click on maintain button and select Rotate secrets button Now click on Rotate SSL certificates after which dialogue box will appear click on yes Now wait till rotating secret symbol is loading as following screenshot after which you will be able to access your D365 Finance and operation link easily. Hope this blog will help you.Thank you
Share Story :
Rest API GET call in JSON format in Dynamics 365 Finance and Operations
Introduction: In this blog, we will see how to get response from Rest Api through GET call Solution: Consisting of basic authentication, we will pass username and password in byteStr and for the endpoint we will put it in url in below code. class CFSJSTestRestAPI { public static void main(Args _args) { int find; str url,aosUri,activeDirectoryTenant; str activeDirectoryClientAppId; str activeDirectoryClientAppSecret; str postData,activeDirectoryResource; str aadClientAppSecret,oAuthHeader; str returnValue,jsonString,jsondszstr; System.Net.HttpWebRequest request; System.Net.HttpWebResponse response; System.Byte[] byteArray; System.IO.Stream dataStream; System.IO.StreamReader streamRead; System.IO.StreamWriter streamWrite; System.Net.ServicePoint servicePoint; System.Net.ServicePointManager servicePointmgr; System.Net.HttpVersion version; CLRObject clrObj; Newtonsoft.Json.JsonReader reader; System.Text.Encoding utf8; Counter countCounter; Object obj; Map data; System.Byte[] byteArraynew; System.Net.WebHeaderCollection headers = new System.Net.WebHeaderCollection(); new InteropPermission(InteropKind::ClrInterop).assert(); str byteStr = strfmt(‘%1:%2’, “USERNAME”, “PASSWORD”); headers = new System.Net.WebHeaderCollection(); url = “http://dummy.restapiexample.com/api/v1/employees”; clrObj = System.Net.WebRequest::Create(url); request = clrObj; request.set_Method(“GET”); request.set_KeepAlive(true); request.set_ContentType(“application/json”); utf8 = System.Text.Encoding::get_UTF8(); byteArraynew = utf8.GetBytes(byteStr); byteStr = System.Convert::ToBase64String(byteArraynew); headers.Add(“Authorization”, ‘Basic ‘ + byteStr); request.set_Headers(headers); servicePoint = request.get_ServicePoint(); System.Net.ServicePointManager::set_Expect100Continue(false); System.Net.ServicePointManager::set_SecurityProtocol(System.Net.SecurityProtocolType::Tls12); response = request.GetResponse(); dataStream = response.GetResponseStream(); streamRead = new System.IO.StreamReader(dataStream); jsonString = streamRead.ReadToEnd(); info(strFmt(“RESPONSE: %1”,jsonString)); dataStream.Close(); response.Close(); } } Thanks for reading !!!
Share Story :
List of users for a security role | D365FO
Introduction: In this blog, we will see how we can get list of users who has assigned a specific security role Solution: UserInfo userInfo; SecurityRole securityRole; SecurityUserRole securityUserRole; while select networkAlias from userInfo where userInfo.networkAlias exists join securityUserRole where securityUserRole.User == userInfo.id exists join securityRole where securityRole.RecId == securityUserRole.SecurityRole && securityRole.Name == ‘Sales manager(NameOfTheSecurityRole)’ { info(userInfo.networkAlias); } Thanks for reading !!!
Share Story :
Table Browser Extension for Google Chrome | D365
Now table browser becomes much easier for Microsoft Dynamics 365 Finance and Operations. Here you go with Google Chrome Extension – Table browser caller for D365FO. It’s very easy to install and use it. After installing the extension to the browser, it appears on the top bar and looks like While clicking on the extension, You can find the tab named with config where you need to put the URL of the respective environment and save it. Once config is setup, you need to go to the main tab that is Table Browser Caller as shown in above figure where you would setup mainly: Search for table name: name of the table Company Id: name of the legal entity After that, you need to find the table in the search box and just press the Enter key. And you will be redirected to the table in the new tab. In addition, Table browser has also few other features like Browse all table lists Browse all data entities 1. For getting the list of tables you need to click on Table list: Result as, 2. For getting the list of data entities you need to click on Data entities: Result as,
Share Story :
Set form control access via security role in D365 Finance
In some of the cases instead of providing security to whole form we need it for particular form control.So this blog will help you with providing access to form control via security roles.If you want to know more about security roles you can use my previous blog . First of all we need form control where we need to set some of the properties as follows. In our case we are using laid off button as shownNow select the button and press F4 for its properties and set needed permision to manual as follows Now in your desired security privilege you can either directly set form control permissions or Entry Points.For form control permission method right click on form control permission and select new form and after that set name property to your desired form (Hcmworker in our case) as follows Now right click on your form and select New control option as follows and set control name and permission for it as follows For Entry point method you need first need to add new entry point and set its object type and object name properties or for existing ones select desired entry point and click on drop down arrow and on controls right click and select new control.And now set its grant and name properties to desired control and its access rights After this you need to assign this privilege in desired security role and security duty as previously discussed in security role blog
Share Story :
Create security role in D365 Finance and operation
In D365 Finance and Operations when you need to provide and restrict users from a certain operation you can make use of security roles. You can create security roles from Finance and operations environment itself or from its development tool i.e Visual Studio. In this blog, we are going to create a security role in Visual Studio as follows. Create privilege First of all we need to create privilege as follows now we need to add new entry point and set object type in our case display menu item from properties Now add object name(display menu item name) as follows create role Now we need to create role where above created privilege will be needed create new security role as follows now we need to add new privilege in role as shown And from properties select privilege which we have created in previous step Create Duty Now we have to create new duty and assign previously created privilege in its properties as shown Now we can see security role in FnO environment select any user from system administration>>users and click on assign role as follows and now search for priviously created role and click on Ok button now your security role is assigned to user with our role will be able to see the object like form, report etc except user with system administrator.
Share Story :
Purchase order approval through a Mobile device in Microsoft D365 Fianance and Operations
In this blog I am going to explain in brief about the Purchase order approval mobile workspace. This workspace lets you view purchase orders and respond to them through actions. For example, you can approve or reject a purchase order. After a purchase order (PO) has been created, it might have to go through an approval process. After the vendor has agreed to the order, the PO is set to a status of Confirmed. POs that don’t use change management have a status of Approved as soon as they are created. A PO creates inventory transactions only when it reaches the Approved status. Once you’ve activated the Change management, approval workflow is introduced. As a system administrator, you must publish the Purchase order approval mobile work space To do that Click Settings> Mobile app. Select the mobile workspace to publish. Click Publish Now on your mobile go to Playstore and download Microsoft Dynamics 365 Unified Operations App Once you have downloaded the App and logged in you should see the Purchase order approval workspace on your Mobile App
Share Story :
x++ code to import data from excel to D365 FnO
We can also import data through code in D365 FO. Data import through code in D365 works differently than Ax2012 since cloud services. Import Class we are trying to import data from Excel to D365FO through the following code. using System.IO; using OfficeOpenXml; using OfficeOpenXml.ExcelPackage; using OfficeOpenXml.ExcelRange; class EmplAttendance { public void run() { this.updateDailyAttendance(); } void updateDailyAttendance() { System.IO.Stream stream; ExcelSpreadsheetName sheeet; FileUploadBuild fileUpload; DialogGroup dlgUploadGroup; FileUploadBuild fileUploadBuild; FormBuildControl formBuildControl; EmplAttendance_CFS emplTimeAttendance, insertTimeAttendance, updateTimeAttendance; COMVariantType type; Dialog dialog = new Dialog(“Daily Attendance Imported”); dlgUploadGroup = dialog.addGroup(“@SYS54759″); formBuildControl = dialog.formBuildDesign().control(dlgUploadGroup.name()); fileUploadBuild = formBuildControl.addControlEx(classstr(FileUpload), ‘Upload’); fileUploadBuild.style(FileUploadStyle::MinimalWithFilename); fileUploadBuild.fileTypesAccepted(‘.xlsx’); str COMVariant2Str(COMVariant _cv) { switch (_cv.variantType()) { case COMVariantType::VT_BSTR: return _cv.bStr(); case COMVariantType::VT_EMPTY: return ”; default: throw error(strfmt(“@SYS26908”, _cv.variantType())); } } if (dialog.run() && dialog.closedOk()) { FileUpload fileUploadControl = dialog.formRun().control(dialog.formRun().controlId(‘Upload’)); FileUploadTemporaryStorageResult fileUploadResult = fileUploadControl.getFileUploadResult(); if (fileUploadResult != null && fileUploadResult.getUploadStatus()) { stream = fileUploadResult.openResult(); using (ExcelPackage Package = new ExcelPackage(stream)) { int rowCount, i,columncount,j; Package.Load(stream); ExcelWorksheet worksheet = package.get_Workbook().get_Worksheets().get_Item(1); OfficeOpenXml.ExcelRange range = worksheet.Cells; rowCount = (worksheet.Dimension.End.Row) – (worksheet.Dimension.Start.Row) + 1; columncount = (worksheet.Dimension.End.Column); for (i = 2; i<= rowCount; i++) { str Emplid; TransDate WorkingDate; emplid = (range.get_Item(i, 1).value); WorkingDate = str2Date((range.get_Item(i, 2).value),123); select * from emplTimeAttendance where emplTimeAttendance.EmplId = = Emplid && emplTimeAttendance.WorkingDate = = WorkingDate; if(emplTimeAttendance) //if record already exists update it { emplTimeAttendance.selectForUpdate(true); emplTimeAttendance.Timein = any2Str(range.get_Item(i, 3).value); emplTimeAttendance.Timeout = any2Str(range.get_Item(i, 4).value); emplTimeAttendance.OT = any2Real(range.get_Item(i, 5).value); ttsbegin; emplTimeAttendance.update(); ttscommit; } Else //insert the new record { insertTimeAttendance.EmplId = (range.get_Item(i, 1).value); insertTimeAttendance.WorkingDate = str2Date((range.get_Item(i, 2).value),123); insertTimeAttendance.Timein = any2Str(range.get_Item(i, 3).value); insertTimeAttendance.Timeout = any2Str(range.get_Item(i, 4).value); insertTimeAttendance.OT = any2Real(range.get_Item(i, 5).value); insertTimeAttendance.insert(); } } } } else { error(“Error here”); } } } public static void main (Args args) { EmplAttendance emplDailyAttendanceImport; emplDailyAttendanceImport = new EmplAttendance (); emplDailyAttendanceImport.run(); } }