Latest Microsoft Dynamics 365 Blogs | CloudFronts - Page 82

Time zone Conversion from Microsoft D365 for SSRS Reporting

Introduction: Converting Date/Time values according to a time zone is quite challenging task in SSRS Reporting. For D365 CRM online we can achieve this using CDate Function. I will demonstrate how to use CDate function with a dynamic time-zone parameter. Step 1: Add this reference to the report properties: Click on “References” and then click on “Add” button under “Add or remove assemblies”. Browse the following file from your BIDS folder. Microsoft.Crm.Reporting.RdlHelper, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Click on Ok button to save the changes. Step 2: Create the parameter in the report data section in the “Parameters” folder as shown below: In the “Default Values” section check the click on “Add” Button. Enter the User Time Zone in the Formula and click on OK to Save the Changes. Step 3: To use this functionality is simply as follows: DateValue(CDate(Microsoft.Crm.Reporting.RdlHelper.DateTimeUtility.ConvertUtcToLocalTime(Fields!msdyn_dateValue.Value, Parameters!CRM_UserTimeZoneName.Value))) Example: If the Expression or Formula is as follow: Last 30 =WeekdayName(Weekday(DateSerial(Year(Fields!msdyn_dateValue.Value), Month(Fields!msdyn_dateValue.Value),”1″).AddMonths(1).AddDays(-30))) The Replace it with: Last 30= WeekdayName(Weekday(DateSerial(Year(DateValue(CDate(Microsoft.Crm.Reporting.RdlHelper.DateTimeUtility.ConvertUtcToLocalTime(Fields!msdyn_dateValue.Value, Parameters!CRM_UserTimeZoneName.Value)))), Month(DateValue(CDate(Microsoft.Crm.Reporting.RdlHelper.DateTimeUtility.ConvertUtcToLocalTime(Fields!msdyn_dateValue.Value, Parameters!CRM_UserTimeZoneName.Value)))),”1″).AddMonths(1).AddDays(-30))) Note: This is an easy way of dynamically converting a time zone from UTC to the user’s local time using CRM Online. We have to replace all the formulae which contain the DateTime field value which is retrieved directly from FetchXML with the above mentioned Function to avoid issues in SSRS reports due to Time Zone Conversion.

Share Story :

How to Synchronize Office 365 and Zoho People?

If your organization is using Zoho People and Office 365, you will find this article very useful. In this article we are going to synchronize users between two applications, we will link Zoho people with Office 365 and can log in to Zoho People using Office 365 password instead of having a separate password for both the applications. IT Considerations: Zoho People subscription is required. Office 365 subscription is required. This article basically applies if you have a new Zoho people system and none of the users is added yet. If the users are already added in Zoho, there is a password created already for accessing Zoho People. Domain DNS Zone credential is required for the domain verification process. Step 1: Get the Zoho People App. Sign in to your Office 365 account (portal.office.com). Click on All Apps and click the Add-In button. Search for the Zoho People App and click on “GET IT NOW” and then click on Continue (check below screenshot). Once the above process is followed, you will be asked to log in and then provide permission to the app. Once you accept, you will be able to access Zoho People. The administrator who installs the Zoho People app for Office 365 will automatically become an admin in Zoho People. After you get the app, it will be shown in the app list on portal.office.com. Step 2: Adding users from Office 365. Once the Zoho People app is enabled for Office 365, you can add your users to the Zoho people account from Office 365 tenant. Note – Only Zoho people admin can sync the users from Office 365 to Zoho. To add users from Office 365 tenant, go to Zoho People, click Settings > Users. Click on sync > Import from Office 365. After that, you will be asked to verify the domain (see below screenshot). To verify the domain, you will need to add either the TXT or CNAME records to the DNS Zone for the domain. DNS Propagation may take some time, depending upon where it is hosted. After some time you can click on the verify button. If the DNS propagation is done, the domain will get verified, if it doesn’t get verified, you will need to wait for the propagation. You can see the verification status in the below screenshot. You will find the Users from Office 365. Select Users from the list to be added to your Zoho People account and Click ‘Import User’. The imported users will be added to the user’s list in Zoho People. Note – When you have synced the users from Office 365, Zoho People will not create a password for those users and you will need to log in with Office 365 credentials. Step 3: User login – For End-users. Once all the user is added to the Zoho People account, the user will be able to login to Zoho. Here are the steps on how to log in. Log in to portal.office.com and click on All Apps (the same process which is shown in step 1). Click the Add-In button and search for the Zoho People app and then click the “GET IT NOW” button. It will now show in the My Apps on the portal.office.com. End-users can directly go to portal.office.com and then click Zoho People to login. If you directly want to log in to Zoho People without going to the above portal, you can go to the URL – https://www.zoho.com/people/login.html Click on Sign In and since we do not have Zoho People password as we synced the users from office 365 and not created it on Zoho People directly, we will need to click on Sign in with Google or other IDPs. After that select Office 365 and sign in using your Office 365 credentials. Since this will become a longer process, it is better to get the Add-In on portal.office.com and go to Zoho People directly. It will be very helpful for the Admins with regards to the User management since the user will be managed from Office 365 itself, which means adding users and a password reset will be done from Office 365 Admin Center. It’s just that whenever a user is added in Office 365 Admin Center, user list needs to be synced once from Zoho People by the admin. This article will also be very helpful for those who are using Office 365 and Zoho people or who are willing to use Zoho People for HR processes. By following the above process, you can log in to Zoho people by using Office 365 credentials and will not have Zoho People credentials separately to remember.

Share Story :

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 :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange