Tag Archives: D365
Model import and export in D365 Finance and Operations using Powershell
When we want to move customization done on specific model from one environment to other development environment we need to export and import the model file. Steps for model import and export using PowerShell :- Open PowerShell in administrator mode. Change directory to the path of package bin folder. Export command:-.\ModelUtil.exe -export -metadatastorepath=C:\AOSService\PackagesLocalDirectory -modelname=”name of model” -outputpath=path to store model after exportFor example: If model name is TOUpgradeModel and I want to store the model file to path is C:\Temp\ModelFile The command will be as follows: .\ModelUtil.exe -export -metadatastorepath=K:\AosService\PackagesLocalDirectory -modelname=”TOUpgradeModel” -outputpath=C:\Temp\ModelFile Output file you can see on the specified path as Import Command :-.\ModelUtil.exe -import -metadatastorepath=C:\AOSService\PackagesLocalDirectory -file=the path from. axmodel to importFor example: .\ModelUtil.exe -import -metadatastorepath=C:\AOSService\PackagesLocalDirectory -file=C:\Temp\ModelFile\TOUpgradeModel-Cloudfront.axmodel ( Note : If model already exist in your environment, trying to import the same model you will receive the error message of “Model already exist”. So, delete the existing model by command .\ModelUtil.exe -delete -metadatastorepath=C:\AOSService\PackagesLocalDirectory -modelname=” TOUpgradeModel ” try to import the model)
How to resolve Error “Exception from HRESULT: 0xC0202009” While data export
While Exporting data using data entity in D365 FO sometimes the Data project fails to export data with error “Exception from HRESULT: 0xC0202009”. While event log displays – EventData methodName DMFGenerateSSISPackage.generateFileDataV2() diagnosticsMessage System.Exception: Exception from HRESULT: 0xC0202009 at Microsoft.Dynamics.AX.Framework.Tools.DMF.ServiceProxy.DmfEntitySharedTypesProxy.DoWork[T](Func`1 work) at Dynamics.AX.Application.DMFGenerateSSISPackage.`generateFileDataV2(DMFDefinitionGroupExecution _dmfDefinitionGroupExecution, String _defGroupName, DMFFileFormat _fileFormat, DMFDelimiter _rowDelimiter, DMFDelimiter _columnDelimiter, String _codePage, String _locale, NoYes _isFirstRowHeader, NoYes _unicode, String _source, String _textQualifier, DMFXMLStyle _style, String _rootElement, String _filePath, Map _entitySyncVersion, Int32 _previewCount, Boolean @_entitySyncVersion_IsDefaultSet, Boolean @_previewCount_IsDefaultSet) in xppSource://Source/ApplicationFoundation\AxClass_DMFGenerateSSISPackage.xpp:line 1273 In Such Cases, the reason behind this is some target fields is may be disabled or cause this problem. To resolve this problem, you need to perform the following steps :- Refresh Entity List Data Management>>Framework parameters>>Entity Setting And wait until all entities got refreshed Regenerate Mapping – Select data entity with the above issue (In our case Sales Order header v2 Entity)from data entities in data management. Click on Generate Mapping – Select “Yes” from generation warning Note:-You can try to disable/remove fields from the mapping until it starts working. This way you at least find out the problematic field. To be more effective, disable the first half of the field list. If the export works, the problem was in some of the disabled fields. I hope this will help you.
Error “A reference to ‘xyz ‘ is required to compile this module” solution
Many of the time while building project/solution we came across the “reference is required to compile this module error”. The reason behind this error is that your module’s reference package is missing the required package. In error itself, the missing module can be rectified as shown for example in following screenshot reference to “SourceDocumentationTypes” is not made. Now you have to add a missing reference to your module as follows: Select Update model Parameters from Dynamics 365 >>Model Management>>Update model Parameter Now select the required model name from the model list and click on Next. Now make sure to select the checkbox in front of a required reference from reference packages (In our case SourceDocumentationTypes reference was not there ) and click on next. Now click on finish. Now after attaching a reference to the package build package/Solution and you have solved your error.
Dynamics 365 Finance and Operations : Picking and Receiving – Transfer In Process in Retail POS
Steps to Perform Transfer In in Dynamics 365 for Retail on POS Go to Picking and Receiving –> click on + icon and click Transfer In Select the store from where you want to transfer in, Delivery date and mode of delivery. Add or scan all the products and its quantity. Click on + icon to add more products to the transfer order You can save the products added by clicking on Save icon. The status of the order will be in Draft. You can continue adding products when it is in Draft state by clicking on + icon. Once you are done adding all the products click on commit icon. Once the order is committed the status will change to created and you will not be able to add products. Once the Order is created, the Order will reflect in the store from where the order is requested. Perform the following steps in that store. For example the warehouse. [Products can be shipped from Finance and Operations as well] Select the transfer In order and click the update icon. Click on ship all icon to ship the products. This will change the ship now column with values to ship. Then click on commit. This will change the status of the order to shipped. When the status is changed to shipped the same status will reflect in the store 101 as well. On store 101 User must click on the transfer order and click on update. Click on receive all icon and click on commit icon. This will complete the process.
HTTP POST Requests using Microsoft Flows
Introduction: In this blog we will demonstrate the working of HTTP Request -Response in Microsoft Flows. Implementation: Step 1: In our example we will make a POST call to our Microsoft Flow so that we can further apply some logic in Flows. The POST request contains the following data. JSON: [{ “name”: “TestName”, “Address”: “TestAddress” }] Now we can use online editor tools to create a schema file of the above JSON. (https://jsonschema.net/). Submit the JSON data and the schema will be generated as shown below. Step 2: Now we go to Microsoft Flows,create a new flow and add the first step as “Request” as shown below: Step 3: We then paste the JSON schema that we earlier saved In the “Show advanced” options we have to add the following details: Once that is done we select a condition. In our example we will pass a JSON Array hence we will loop through each item. Here we add a apply to each condition as shown And we add a dynamic output from the previous stage Then inside the apply to each loop we can add any action and take the values passed from the POST request. For this example I create a new account in CRM with the name and address provided as shown below Step 4: Now when we save this flow a URL is generated in the First HTTP Request step. We test the flow by calling this URL from Postman. The URL generated is show below Step 5: Now we open Postman and write the request as shown below Also in the Header section we add the following details Step 6: Once we click on Send the two records are created in CRM as shown below Conclusion: We can call this URL from outside Dynamics CRM as well and using this we explore many more functionalities provided by Microsoft Flows to achieve the desired outcome.
Store Coupon Code in Dynamics 365 Finance and Operations
Introduction: In this blog we will see how to apply coupon discount on MPOS (Store) in Dynamics 365 for Finance and Operations. Steps: Step 1: Create Bar code Mask Character for Coupon Code. Step 2: Create a New Barcode Mask set up. Keep the type as Coupon. Step 3: Create Bar Code for Coupon. Assign the Mask ID which was created in step 2. Step 4: Create Number Sequence for Coupon Code ID and Coupon Number. Step 5: Set the Retail Parameters for Coupon. Assign the Mask ID that was created. Step 6: Create a New Discount. Mention the discount Price, Products in Lines, Price group, Valid Discount Account and enable coupon code required. Step 7: Create a new Coupon. Mention the usage limit, usage type, associate discount to the coupon, Create a new line for coupon. Activate the Coupon. The Bar code will be generated. Make a note of the Bar code. This is how you set up Coupon Code on Stores in Dynamics 365 for Finance and Operations. Run Jobs and flow the discount to the store. To Redeem the Store Coupon Code: Step1: Scan the product that is under Discount. Step2: Scan the Barcode or Manually inter the Barcode. Step 3: The discount will be applied to the product along with the discount name Step4: Make Payment.
Pin Embedded Power BI Reports to Workspace in Dynamics 365 for Finance and Operations
Introduction: In this blog article, we shall see how to pin the power BI reports to Workspace. How to pin? Power BI reports can be added to any workspace that contains a Links section. Once the Power BI reports have been deployed successfully you can pin them to your Dynamics 365 Finance and Operations Workspace. Steps: Open a workspace in Dynamics 365 For Finance and Operations In the workspace, click the Options tab Click Open Report Catelog The list of reports comes from the reports that you have in your Power BI account Click on Ok and those reports will be on your workspace Similarly any customized or out of the box reports can be pinned to your workspace.
Email Migration from D365 CRM v8.2 to D365 CRM v9 using TIBCO Cloud Integration: Attachments & Status Update
Introduction: In this blog, I will outline how to migrate Email Attachments and update the status if an email. In my previous blogs, I have shown how to migrate the body of an Email and its Activity Parties from one CRM to another using Scribe. Email Attachments: Below, is the map used to migrate Email Attachments. As you can see, it is pretty straightforward, barring a few things to keep in mind while mapping. 1) Email Attachments are stored in the ‘activitymimeattachment’ entity. 2) I did not map the ‘attachmentid’ field as it produced an error as well as there is probably no reason one would need the GUID of the attachment. Not mapping attachmentid will create a new GUID for the attachments being migrated. 3) Most data regarding the Attachments migrated along with the first map migrating ‘Email’ activity. 4) That is why, in this map, we just migrate the subject, filename and body fields along with ‘objectid’ and ‘objecttypecode’. 5) The ‘objecttypecode’ tells which entity the attachment belongs to and its GUID. Once you run the map successfully, you will see the attachments displayed in the email. This includes image attachments as well. Target: Email Status Update: As for most Activity entities, while migrating, we migrate with an ‘Open’ status. This is done to ensure the record does not become read-only which would not allow us to migrate the corresponding Activity Parties and Attachments. This could lead to an inconsistency in data in Source and Target. Once the Activity Parties and Attachments have been migrated to the record, we can now update the Status of the Email to what it is in the Source environment. This is a basic but fundamental step to ensure no data inconsistency. Sample State Code & Status Code Values: In this map, all we have to map are the ‘Status Code’ and ‘State Code’ as it is in the Source Environment. This will update the status of the email. In the screenshot below, you can see that the Status has been updated to ‘Sent’. Conclusion: This completes the process of creating TIBCO Cloud Integration Maps for Email Migration from CRM to another. I hope this and my two preceding blogs provide a sufficient outline for the process of Email Migration.
Actionable Audit App to access audit logs in D365
Introduction: In this blog we will see how audit logs in D365 can be fetched that can be used for reporting purposes. Auditing helps to track changes made to the data in D365. The System Auditing entity cannot be accessed. Actionable Audit is a App by Microsoft Labs in which the required audit logs can be stored in the actionable audit entity which can be used later on by fetching the records of that entity. This audit log can be helpful to create Dashboards in Power BI, create reports etc to get meaningful information from the data. Implementation: Step 1: First we enable the auditing for the organization(globally) in Settings > Auditing. Step 2: We then enable auditing for the required entities and fields. Step 3: Download the Actionable audit app from the AppSource. Step 4: After accepting the terms and condition is done, it will take some time to install the solution as shown in the notification below. Step 5: In the plug-in registration tool we can see the assembly MicrosoftLabs.ActionableAudit is present. Step 6: Out of the box some steps are already registered as seen below Note: Only if the field is enabled for auditing the logs will be stored in Actionable Audit entity. Step 7: If required, the out of the box plugin steps can also be unregistered. And we can also add custom entities to the list. The pre-image and post-images also must be registered for different message which is shown in the user guide in the AppSource. Step 8: After the logs are created they are stored in Actionable audit entity as shown in the below example. Hope this helped!