Blog Archives - Page 84 of 171 - - Page 84

Category Archives: Blog

Check Plugin Timeout issues using Tracing in D365 CE

In Dynamics plugin implementations, you might have lengthy complex plugins that makes calls to Dynamics several times. I agree that calls to Dynamics should be as less as possible and use Link Entity as much as possible and the plugin should be well designed to handle such lengthy executions. However, there are instances where these plugins are probably updating some fields that in-turn trigger some other sync processes and the execution begins to take longer than it should. At times, such lengthy executions result in the plugin timing out. In the case of Dynamics 365 Online, the timeout is 2 minutes and you can’t change it. (In on-premise, you can) And now, you need to know what’s taking so long! So I want to propose a method which proved effective for me to identify this. First, in case you are looking to work with Tracing for plugins, here’s a great blog on the same – Debugging Your Plug-ins with the Plug-in Trace Log Add DateTime to Trace Logs One of the best approaches to identify what portion of the plugin execution is actually taking time to process is to keep adding Trace logs and that too, with a timestamp! This will give you an idea of what part of your plugin is taking long to execute and will give you a fair idea if anything needs to be redesigned. Set these traces at the very beginning of your plugin and at all necessary places as well as the very end to cover execution cycle well. And your logs will actually record the time when that operation was hit. So now, you have an idea of how the 2 mins are spent and maybe start troubleshooting in that direction. I hope this quick tip helps!

Share Story :

Embed Secure Power BI report using Python Web Application with Flask in Visual Studio 2015

In this article, we will embed a Power BI report in a python web application with flask in visual studio 2015. Following are the steps to embed a report. STEPS: Create a new Python Web Project by selecting “Web Project” under Python in Visual Studio 2. If you can’t see this option then first you have to install Python tools for visual studio 2015 2.1 Run the Visual Studio installer through Control Panel > Programs and Features, selecting Microsoft Visual Studio 2015 and then Change. 2.2 In the installer, select Modify 2.3 Select Programming Languages > Python Tools for Visual Studio and then Next: 2.4 Once Visual Studio setup is complete, install a Python interpreter of your choice. Visual Studio 2015 supports only Python 3.5 and earlier; later versions generate a message like Unsupported Python version 3.6 3. Next step to create a Python Virtual Environment. (This is not mandatory but it is advisable to create a virtual environment to avoid changes to global python installation. ) 4. Expand the project in Solution explorer and right click “Python Environments” and select “Add Virtual Environment”. Accept the default environment name “env” and create the python virtual environment. On successful creation of Virtual Environment, Visual studio would automatically point to newly created Virtual Environment instead of Global Python environment 5. Right click “env” (the name of virtual environment) and select “Install Python Package” Provide the name of the Package as “Flask” and leave the installation mode to “pip”. The alternate installation mode is “easy_install”. Wait for the installation to complete and you can view “Flask” and its dependent packages in the Solution Explorer on successful installation Now the environment is all set and the next step is to create the actual web application Add an empty Python file named “OpenPowerBIReport.py” (Solution Explorer => Add => New Item) and set it as start-up file (Right click index.py and select “Set as Start up File” in context menu) Add the below code to OpenPowerBIReport.py . The below code snippet is creates a variable by name “data” and passes its value to “index.html” when the user lands at “root” location (“/”) of the website Add two folders named “Templates” and “Static” to the project. These are the folders Flask would be looking for html files (Templates) and other assets (Static) from flask import Flask,render_template from os import environ app = Flask(__name__) @app.route(‘/’) def index(): weburl=”https://app.powerbi.com/reportEmbed?reportId=df8a34c9-b173-4449-b7e3-2cd29208cd33&autoAuth=true&ctid=26c4b2e4-ec07-4c7b-92e5-97f52865e98b&config=eyJjbHVzdGVyVXJsIjoiaHR0cHM6Ly93YWJpLXNvdXRoLWVhc3QtYXNpYS1yZWRpcmVjdC5hbmFseXNpcy53aW5kb3dzLm5ldCJ9” return render_template(‘PowerBIReport.html’,weburl=weburl) if __name__ == ‘__main__’: HOST = environ.get(‘SERVER_HOST’, ‘localhost’) try: PORT = int(environ.get(‘SERVER_PORT’, ‘5555’)) except ValueError: PORT = 5555 app.run(HOST, PORT,debug=True) Add a new html file named “PowerBIReport.html” inside the templates folder and copy paste the below html snippet to that file <!DOCTYPE html> <html lang=”en” xmlns=”http://www.w3.org/1999/xhtml”> <head> <meta charset=”utf-8″ /> <title>Home Page</title> <link href=”/static/styles.css” rel=”stylesheet” /> <style> .button { background-color: #4CAF50; border: none; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 4px 2px; cursor: pointer; } </style> </head> <body bgcolor=”#E6E6FA”> <div> <h1>Embed Power BI report in Python web apps !!</h1> <a href=”https://app.powerbi.com/reportEmbed?reportId=df8a34c9-b173-4449-b7e3-2cd29208cd33&autoAuth=true&ctid=26c4b2e4-ec07-4c7b-92e5-97f52865e98b&config=eyJjbHVzdGVyVXJsIjoiaHR0cHM6Ly93YWJpLXNvdXRoLWVhc3QtYXNpYS1yZWRpcmVjdC5hbmFseXNpcy53aW5kb3dzLm5ldCJ9” class=”button” target=”_blank”>Go to Power BI Report In New Tab</a> <button onclick=”location.href = ‘https://app.powerbi.com/reportEmbed?reportId=df8a34c9-b173-4449-b7e3-2cd29208cd33&autoAuth=true&ctid=26c4b2e4-ec07-4c7b-92e5-97f52865e98b&config=eyJjbHVzdGVyVXJsIjoiaHR0cHM6Ly93YWJpLXNvdXRoLWVhc3QtYXNpYS1yZWRpcmVjdC5hbmFseXNpcy53aW5kb3dzLm5ldCJ9‘” type=”button” class=”button”> Open Power BI Report </button> </div> <div> <iframe width=”680″ height=”510″ src=”{{ weburl }}” frameborder=”0″ allowFullScreen=”true”></iframe> </div> </body> </html> Add a new file named “style.css” to the static folder and the below css snippet to the file. This file is explicitly added to the project to show where to place static assets instead of adding inline css in html. .info {     margin:auto;     text-align:center;     padding-top:20% }12. Solution Explorer would look like the below picture after adding html and css 12. The new Embed option is available on the File menu for reports in the Power BI service. Select the Embed option to open a dialog that provides a link and an HTML snippet that can be used to embed the report securely. You’ll need to use your portal’s embed feature or edit the web page’s HTML to add the report. 13.That’s it. Hit F5 and now you can expect a website running similar to the one shown below.

Share Story :

Automate sending of Survey (Recurring) – Microsoft Forms Pro

You might be having some requirements for automatically sending Microsoft Forms survey in recurrence like there might be any type of survey form which needs to be sent out to all the employee on a quarterly basis or monthly basis. To achieve that you can use Microsoft Flow, there are four options available currently Automated Flow, Instant Flow, Scheduled Flow, and Business Process Flow. You need to use the Scheduled Flow, as the survey needs to be sent out in recurrence. Let’s see how to do that. Note: You need to have Microsoft Forms Pro because in Microsoft Forms “Send a Survey” action is not available in Flows. Assuming you have already created Survey in Microsoft Forms Pro. Steps 1: Office 365 Group You must have an Office 365 Group, or you can create one, in which you will need to add all the users to whom you want to send out the survey. Go to Microsoft 365 Admin Center > Groups. Create an Office 365 Group. Add members. Step 2: Creating a new Flow As it will be a scheduled survey, you will need to create a scheduled Flow. Click Create. Select Scheduled Flow. Provide the required details and click Create. Automatically this Recurrence tab will be there, where you can make changes in the frequency in which this survey will be sent. You can also specify the advanced options, where you can select the Time zone and start time. Click on +New step and then in Choose an action search for “Office 365 Group”. This is required as the Flow will require the list of addresses on which the survey will be sent. After selecting Office 365 Groups, choose Actions “List Group Members” and then select the Office 365 Group which you created earlier in Step 1. Click on New Step again and search for Microsoft Forms Pro and then choose Action “Send a Survey”. You will need to provide the following details (see screenshot). To: When you click on ‘To’ field, you will get a list of Dynamics Content from which you will have to choose “Mail”. After selecting Mail in the ‘To’ field it will look something like this, again you will need to click on Send a Survey. It asked for the ‘To’ filed again, click on the To field and from Dynamic Content, select ‘Mail’. Survey: You will need to select the Survey which you created in Microsoft Forms Pro. Email Template: There are already few default templates provide, you can choose from that. For now, “Enter Custom Value” shouldn’t be selected. The Flow is completed now, and you can go ahead and Save the flow and test if it is working as expected. I hope this article helps you in sending a Microsoft Forms survey automatically to all the people added in the Office 365 Group on a frequency which you set in the Flow. Thanks!

Share Story :

Introduction to Microsoft Dynamics Commerce Tools

As we know, Dynamics 365 Commerce is released in the preview version, So in this blog, we will have a quick explanation upon some important “Authoring Tools” that we may need to Customize our Website.   Once we reach our Dynamics 365 Commerce page, We need to click on the Site that we are going to alter. This will take you to the above page. We can see the “Authoring Tools”  highlighted in red box. The highlighted wordy assets in the red box are the valuables that we will be using to change the webpage. Information regarding the highlighted authoring resources: Pages: These are all the pages that your website will have. It contains everything from login to logout. Every page is justified here with status, last user and last modified. 2. Products: This page has all the products that our D365 Retail online store has inside it. Any change in Retail Online Store products will be reflected here. 3. URL’s: These are URL’s of every Specific Page that you can link with another page. You can discard any page(considering you know its URL) through this authoring tool. Also, if you want to link your website to another page then you can do it from here. 4. Templates: Template is the page design used as a starting point for creating pages of your site. When you add a new page to your website, you need to assign a template for it. When you modify this template, the changes cascade to that respective pages on your site.  5. Fragments: In easy words, we can say this can be the upper & lower part of the website that we are designing. Every fragment that you design can have a fragment.  These are small details that you can keep for your website and can make them reflect on each URL you want to.   6. Assets: It allows you to add all your assets(photos/videos) in a single place. You can reuse them every time on whichever webpage you want. Please note: Every authoring tool has its own specific condition that can be customized as per your needs. Also, this is a preview version. Hence, many more changes are expected in future versions. Hope this helps Dynamics e-Commerce builders 🙂

Share Story :

Error Handling Approaches for Integration

Introduction: Handling Errors is a best practice in Integration when integrating to keep a track of the Errors that occurred during Integration. The Customized Error Handling is Handy to find quick Errors to understand them and resolve as required. This approach can be extended to any Source or Destination as required. Our Scenario: Integration from SalesForce – NAV. Different Approaches to Error Handling: No. Approach Description Customizations Required Comments 1. Entity Level All errors will be logged in an ‘Error Log’ entity in Salesforce and NAV along with the error description and date & time the error occurred. 1. Custom entity ‘Error Log’ 2. Fields for ‘Error Log’ entity: i. Name [String(100)] ii. From Entity [String(100)] iii. Error Message [Note] iv. Record ID [String(100)] v. Created On Date [DateTime]   For instance, i. Name: Error while creating ‘Customer’ in NAV ii. From Entity: Customer iii. Error Message: The specified Country is not valid iv. Record ID: Cust123 v. Created On Date: 08/07/2018   Example:    2. Field Level If an error occurs for a record during integration, the error description will be stored in a custom field on the record in Salesforce or NAV. A custom field ‘Error Description’ will have to be created on the form of all required entities. Field: Error Description: [Note]   For instance, when you open a Customer ‘Cust123’, Error Description: The specified Country is not valid   Example:

Share Story :

Change in URLs for Business Central Tenants

Change in base URLs for Business Central SaaS Tenants. I have noticed the Business Central links for Tenants have changed. For Production the URL in use will be https://businesscentral.dynamics.com/<Tenant ID>/Productionwhereas earlier the URL https://businesscentral.dynamics.com/<Tenant ID>/ For Sandbox the URL in use will be https://businesscentral.dynamics.com/<Tenant ID>/Sandbox whereas earlier the URL was the same as current URLThis changes are mainly to distinguish between the multiple Production Tenants coming up in October with the 2019 Wave 2  Release. For now, both the Old and New Production Tenant URLs are operational.If you login through https://home.dynamics.com/  or through Admin Center it will redirect you through the New URL. I will keep you posted as soon as notice an updates. #msdynbc #msftadvocate #businesscentral #changeinurls #msdyn365bc

Share Story :

Record Deletion Tool in Business Central

Introduction: After a successful Go-Live in Business Central, we somehow need to delete a record from Backend. There is no way of doing this until you write a code to delete the specific record. I also had a word with Microsoft Support Team who recommend taking this approach. Thus I have created a Generic Record Deletion Tool where you have to put your Table Number and Primary Keys to delete the specific record. Record Deletion Tool : https://github.com/olisterr/Data-Deletion-Tool/blob/master/Report%2050199%20DataDeletionReport.al Pre-requisites: Microsoft Dynamics Business Central Books & References: https://forum.mibuso.com/discussion/6922/how-to-setrange-and-find-a-record-with-recordref-datatype Demonstration: NOTE: This tool is available for free without any warranties. Use it at you own risk. 1. Global Search for the Tool: Searching for the Record Deletion Tool 2. Filter records by Table No. and Primary Keys: Filling in the Table No. and Primary Keys 3. During Record Deletion: Shows the Record Deletion Confirmation 4. After Record Deletion: After the Record is Deleted.   Conclusion: This Record Deletion Tool I have added as an extension to Olof Simren’s Data Deletion Toolkit (https://github.com/olisterr/Data-Deletion-Tool). This tool can be used after Post Go-Live to delete a record in Business Central Production Environment. Also, it can help you browse through the Table Data inorder to find a record. Hope this is useful to you. Let me know in comments.

Share Story :

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.

Share Story :

Store ‘Today’s Date’ in a field to use in workflow conditions in MS CRM

Most of us need this in our workflow conditions to check against – to have today’s date handy and then use them in If conditions in workflows. But, the filter in If conditions in workflows don’t let you dynamically select On or after ‘Today’. And when you want to compare to today’s date on selection of On or After, you are forced to enter a date and not dynamically select Today. To overcome this, here’s what you can do to simply store Today’s Date in all records. Calculated Date and Time field So workaround this, you can simply create a new Date and Time type of Calculated field to store the current date and use it in your workflow conditions or wherever you need it. Make sure the type of the field is Calculated and then, Edit the criteria. Select Now() function to set the value of the field. And the final criteria condition will simply look like the below Once you save and publish all your changes, you’ll see that the field is automatically populated with today’s date. Using in Workflow Conditions Now, you can use the same in the workflow conditions as shown below – and you should be able to use this in your workflow conditions which could look like this Hope this quick workaround comes handy!    

Share Story :

How to set the interaction between visual in Power BI

Posted On October 10, 2019 by Yogesh Gore Posted in

Power BI provides interactive features that allow for easy navigation and filtering of the visual on click. But, we can also set the interaction between the visuals. We can have some of the visuals default to a filter functionality whereas other visuals use the highlight method. Type of Interaction No-way – no interaction between visuals One-way – interaction occurs from one visual to another, but not in the reverse direction Two-way – interaction occurs between one visual and another in both directions How to set the interaction? Go to the Edit Interactions button on the Format tab of the ribbon in Power BI Desktop. Once you click the Edit interactions button, you can now edit the interactions between the different visuals. As we can see for the Day wise Revenue card we disabled the interaction for the Month range filter and for Total Month Revenue we disabled interaction for the Day range filter. As if we select the day from the dropdown filter we can see that there is no change in Total Month Revenue. Hope this helps!

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange