Error Resolution of Web client reply address for SSO in Dynamics NAV
Introduction: A Single Sign-on (SSO) user experience is achieved between Microsoft Dynamics NAV and the Office 365 Web Applications where the User is authenticated using Office 356 credentials to access NAV Windows client and Webclient. Error: After configuration of SSO in NAV, the Windows client configures SSO successfully but the Web client throws an error. AADSTS50011: The reply address http://localhost/DynamicsNAV100/WebClient/SignIn.aspx?ReturnUrl=%2fDynamicsNAV100%2fWebClient%2f does not match the reply addresses configured for the application: http://localhost/DynamicsNAV100/WebClient/. Pre-requisites: Microsoft Dynamics NAV 2017 Internet Information Services(IIS) Resolution of the Error: Browse to Internet Information Service(IIS) Select on Microsoft Dynamics NAV, then click on Bindings Click on Add. In the Type Field select ‘https’. In the SLL certificate, select the self-signed certificate generated from the drop down. Click on Restart. Click on Browse link of the Web server Instance and save the url. Configure SSO for Dynamics NAV and in the below command Set-NavSingleSignOnWithOffice365 -AuthenticationEmail “YourAuthenticationEmail” -NavServerInstance “YourNAVServerInstance” -NavUser “YourNavUser” -NavWebAddress “YourNavWebClientAddress” -NavServerCertificateThumbprint “YourNAVServerCertificateThumbprint” -NavWebServerInstanceName “YourNavWebServerInstanceName copy the url saved in the “YourNavWebClientAddress” address. After Binding, Enter your Office 365 credentials and sign in. SSO works successfully for Web client after Binding of the SLL certificate.
Share Story :
Accessing Business Process Flow as Entities – D365 July 2017 Update
Overview: Another new feature announced in the Dynamics 365 July 2017 Update is that the Business Process Flows are now available as entities in D365! That means, you can access them like entities from SiteMap and see the records of their respective entities in an Entity View like you would do with other entities. Turning BPF Entity customization support: Since this is in preview for Dynamics 365 July 2017 Update, you’ll need to turn it on from the Previews section under Settings > Administration. BPF as Entity in Solution: Just like any other entity, the Process appears like an entity. Accessing BPF as entity records: Once this is enabled from the Previews section, you’ll see the entities in the default Sales area as shown below: Business Process Flow as records: Now, so far you’ve seen records having the same business process flows and once you open them, you’d see which records were in which stage. This view gives you which records use a particular Business Process Flow and where has the record reached in the flow. In the above view, each record will open the record of their respective entities. Ex. Jake Cormick is in Process stage and Process stage belongs to Opportunity entity. So opening this record will open the Opportunity record as shown below: Quite Simple! Hope this was helpful.
Share Story :
CRM – Issue with retrieving large document body using Fetch XML
Problem Statement: When we want to export Attachments from CRM (both Notes and Email attachments), we can do this using a Console Application where we read the documentbody from CRM using Fetch XML, and then we convert that to bytes and export to a local folder (or any target system) This Method is proper and should work properly, which it doss most of the time, but fails on some occasions. We have observed an issue, where we were not able to open the downloaded document. It would give below error: “There was an error opening the document. The file is damaged and could not be repaired“. This was the code that we used: private static void ExportEmailAttachments() { string fetchXML = @”<fetch version=’1.0′ output-format=’xml-platform’ mapping=’logical’ distinct=’true’> <entity name=’activitymimeattachment’> <attribute name=’filename’ /> <attribute name=’body’ /> <filter type=’and’> <condition attribute=’filesize’ operator=’gt’ value=’0′ /> <condition attribute=’filename’ operator=’not-null’ /> <link-entity name=’email’ from=’activityid’ to=’objectid’ alias=’ac’> <attribute name=’subject’ /> <attribute name=’regardingobjectid’ /> <attribute name=’activity /> <order attribute=’subject’ descending=’false’ /> <filter type=’and’> <condition attribute=’regardingobjectid’ operator=’not-null’ /> <condition attribute=’modifiedon’ operator=’last-x-months’ value=’3′ /> >”; string FolderPath = @”D:\Attachments\”; EntityCollection allEmailAttachments = crmSvc.RetrieveMultiple(new FetchExpression(fetchXML)); foreach (Entity mimeAttachment in allEmailAttachments.Entities) { string fileName = mimeAttachment.GetAttributeValue<string>(“filename”); if (fileName.EndsWith(“pdf”, StringComparison.OrdinalIgnoreCase)) { string documentBody = mimeAttachment.GetAttributeValue<string>(“body”); byte[] documentBytes = Convert.FromBase64String(documentBody); File.WriteAllBytes(FolderPath + fileName, documentBytes); } } } Solution: We triel lot of methods and various ways to solve, but we found the document was not opening properly. This is what we observed: The issue does not happen with all the files It only happens with large files Observed that the document body from CRM is always exactly 2000 characters From the above, we got to know that CRM is not sending all the document body in the Fetch XML response. We were able to solve the above by removing the “distinct=’true’“. We don’t know how it affects the query, but this was the resolution which worked for us. It is strange, but this fixed the issue. This is the final Fetch XML. string fetchXML = @”<fetch version=’1.0′ output-format=’xml-platform’ mapping=’logical’ distinct=’true’> <entity name=’activitymimeattachment’> <attribute name=’filename’ /> <attribute name=’body’ /> <filter type=’and’> <condition attribute=’filesize’ operator=’gt’ value=’0′ /> <condition attribute=’filename’ operator=’not-null’ /> <link-entity name=’email’ from=’activityid’ to=’objectid’ alias=’ac’> <attribute name=’subject’ /> <attribute name=’regardingobjectid’ /> <attribute name=’activity /> <order attribute=’subject’ descending=’false’ /> <filter type=’and’> <condition attribute=’regardingobjectid’ operator=’not-null’ /> <condition attribute=’modifiedon’ operator=’last-x-months’ value=’3′ /> “; Anyone, who can tell why this is the behavior, please feel free to comment below.
Share Story :
Spam Filter Policy in Exchange Online.
Introduction: Spam is an irrelevant or unsolicited messages sent over the Internet, basic spam filter settings in Exchange Online include selecting the action to take on messages identified as spam. Spam-filter policy settings are applied to inbound messages only. You can edit the default spam filter policy to configure your company-wide spam filter settings and create custom spam filter policies and apply them to domains in your organization. Administrator needs to have Organization Management and Hygiene Management role group assigned to them. In EAC, go to Protection > Spam filter. You can either edit the default settings or create a custom spam filter by click on +. On Spam and Bulk action page, under Spam and High confidence spam, select the action to take for incoming spam email. By default, move messages to Junk Email folder is selected. In this case, we are selecting Quarantine Message. Quarantine Message – Sends the message to quarantine instead of to the intended recipients. When you select quarantine message, In Retain spam for (days) specify the number of days during which the spam message will be quarantined. On the Block & Allow list page, you can specify entries, such as senders or domains. Message will always be marked as spam if it is in block list and message will always be delivered if sender is in allow list. On the International Spam page, you can filter email messages written in specific languages, or sent from specific countries or regions. You can configure up to 86 different languages and 250 different regions. On the Advanced Optionspage, you can choose On, Off, or Test for each advanced spam filtering option. If you select Test, no action is taken on messages that meet the spam filter criteria however, messages can be tagged with an X-header before they are delivered to the recipient. If you select Test for any of the advanced options, you can configure the following test mode settings when a match is made to a test-enabled option: None – Take no test mode action on the message. This is the default. Add the default test X-header text– Checking this option sends the message to the recipients but adds a X-header to the message that identifies it as having matched a specific advanced spam filtering option. Send a Bcc message to this address– Checking this option sends a Bcc of the message to the email address you provide. Quarantine – If you have selected to move the spam messages in quarantine then you review spam items in quarantine, messages can be released from there either to selected users or all the users. If an item was incorrectly reported as spam, you can also report it as a false positive. If reported as a false positive and it’s a spam-quarantined message, it will also be reported to the Microsoft Spam Analysis Team, who will evaluate and analyse the message. In the below screen, you can see test spam mails and the message status in the right pane. You can review & release the message as an administrator from EAC by selecting the message and clicking on the Release Message icon. If there are more than 500 messages, then you can have an advanced search to find the message. You can use several parameters to find the message, for targeted search for a specific message you can select Message ID. Message ID – If you discover that the message was sent to the quarantine you can then easily find this message in the quarantine by specifying its Message ID. For example, if a specific message is sent by, or intended for, a user in your organization, but it never reaches its destination, you can search for the message using the message trace feature. If you discover that the message was sent to the quarantine you can then easily find this message in the quarantine by specifying its Message ID. Message trace: As an administrator, you can find out what happened to an email message by running a message trace in the Exchange admin center (EAC). Enter the Data range or select custom to specify the search dates, and then click Search. From the Message trace results, select the message and click Edit. You will able to see the details of the message, status, message ID. Hence, you can get the message ID from message trace feature in Exchange Online and can do an advanced search in Quarantine. You can also analyse the message header from Microsoft remote connectivity analyser URL: https://testconnectivity.microsoft.com/?tabid=mha. Message Header – Message headers provide a list of details about the message, such as who sent it, the software used to compose it, and the email servers that it passed through on its way to the recipient. You can find message header in quarantine message, click on the message for which you want the message header. Copy the message header and paste it under message header analyser in Microsoft remote connectivity analyser. For end users to access spam-quarantined message and release message. Go to following URL: https://admin.protection.outlook.com/quarantine, provide Office 365 credentials and sign in. After you’ve signed in and been authenticated, you’ll be directed to the end user spam quarantine. User can view the details of the message and release messages from user quarantine. Configure end-user spam notification. Administrator can also configure spam notification for end-users. So that users get the notifications of spam quarantined message. Go to EAC > Protection > Spam Filter. Select the Spam filter policy for which you want to configure end-user spam notification. On configuration page, select the days in the range of 1-15 and tick on Enable end-user spam notifications. User will get a mail notification for the same. Conclusion: By this way, you can apply a default spam filter policy or create a custom policy for your organization which will help to protect organization from spam mails.
Share Story :
Deprecated Feature in D365 Customer Engagement – July Release (v9)
Introduction: “Deprecated” means Microsoft intends to remove the feature or capability from a future major release of Dynamics 365. The feature or capability will continue to work and is fully supported until it is officially removed. This deprecation notification can span a few years. After removal, the feature or capability will no longer work. Microsoft notifies the Customers and Developers well in advance so that they have sufficient time to take action and update the code. Consolidated list of Deprecated Features in July 2017 release of D365 for Customer Engagement: Click on each of the link for details on Microsoft Official documentation site: Dynamics 365 for Outlook (Outlook client) is deprecated Service scheduling in Dynamics 365 for Customer Service is deprecated Dialogs are deprecated Usage of Parature knowledgebase as the Dynamics 365 knowledge management solution is deprecated Project Service Finder app is deprecated Contracts, Contract Line Items, and Contract Templates entities are deprecated Standard SLAs in Dynamics 365 for Customer Service are deprecated Relationship Roles are deprecated Mail Merge is deprecated Announcements are deprecated Ready-to-use business processes available through Add Ready to Use Business Processes setting are deprecated Some client APIs are deprecated – Details of APIs deprecated with their replacements in the link. EntityMetadata.IsInteractionCentricEnabled property is deprecated Silverlight (XAP) web resource is deprecated We will keep posting more on the details and alternatives for each feature above.
Share Story :
Excel Report using SSIS without Physical Mapping
Introduction: In this article, we will see how we can generate Excel Report in SSIS without doing Physical mapping. Steps: 1. Create Excel file with one data connection in the Excel Sheet. 2. Create a sheet in Excel pointing to the data connection. This will lead to point the connection to the data source, and help create a table in Sheet. As soon as ok is pressed, the data from the connection is pulled. We can save this Excel as a template and next time we just need to refresh the connection and the data will be refreshed in the Excel Sheet. This is the day to day process which requires manual effort, WHAT IF WE CAN AUTOMATE THE REFRESH. It is possible through SSIS services, and Microsoft Interop libraries. Steps: 1. Create a SSIS package with a Script task with C#. Edit the script and include the following code in the Script task Use below script to refresh the data in the Excel. We need to include the reference for the Interop libraries. using Excels = Microsoft.Office.Interop.Excel; string filepath = @”D:\Excel Files\Employee Files.xlsx”; Excels.Application xlApp; Excels.Workbook xlWorkBook; Excels.Worksheet xlWorkSheet; object misValue = System.Reflection.Missing.Value; xlApp = new Excels.Application(); xlWorkBook = xlApp.Workbooks.Open(filepath); xlWorkSheet = (Excels.Worksheet)xlWorkBook.Worksheets.get_Item(1); xlWorkBook.RefreshAll(); xlApp.ErrorCheckingOptions.NumberAsText = true; xlApp.DisplayAlerts = false; xlWorkBook.Save(); xlWorkBook.Close(true, misValue, misValue); xlApp.Quit(); releaseObject(xlWorkSheet); releaseObject(xlWorkBook); releaseObject(xlApp); Benefits: 1. This process is used if we need to generate custom reports. 2. We can use the existing data in excel sheet to create pivot table, and create custom data formats. Feel free to contact us if there is any issue.
Share Story :
Advanced Find Changes
Introduction: While working with Microsoft Dynamics CRM we wanted to make query or advanced find to list down all the account which does not have any opportunity associated to it. But in the dynamics CRM with current or earlier version we cannot write down the simple advanced find query which list down the record does not associate to it. Description: With upcoming update of Microsoft Dynamics 365 CRM, you can perform the Search on that criteria as well. You can design this query in the advanced find. Query: Get all the account which does not have any opportunities. 1. Open advance find and select account entity and in filter select opportunitie in related entities, as show below. 2. You will notice that a new attribute has been added, by which you can apply additional filter on opportunities. 3. Here you need to select the “Does Not contains data”. 4. Now click on result. 5. It will list down all the records which does not have any opportunities as shown 6. Fetch XML: let see what modification has been done in the fetch XML <fetch version=”1.0″ output-format=”xml-platform” mapping=”logical” distinct=”true”> <entity name=”account”> <attribute name=”name” /> <attribute name=”primarycontactid” /> <attribute name=”telephone1″ /> <attribute name=”accountid” /> <order attribute=”name” descending=”false” /> <link-entity name=”opportunity” from=”parentaccountid” to=”accountid” notinvalue=”DoesNotContain” link-type=”outer” alias=”af” /> <filter type=”and” isnotinfilter=”true”> <condition entityname=”opportunity” attribute=”parentaccountid” operator=”null” /> </filter> </entity> </fetch> 7. As you can see that it has an addition filter attribute is added. Query: Get all accounts contains opportunities. 1. Similarly, you can get all the accounts which have opportunities associated to it. 2. Here you need to apply filter criteria as contains data; as shown below. 3. It will list down all the account records with opportunities as shown below. Conclusion: Hope this helps while doing advanced find or designing fetch Xml query.
Share Story :
Embedding D365 Field Service Charts in D365 Online Portals
D365 Field Service has everything to manage your complex business needs from scratch till the end. On the off chance that Field Service is a fundamental piece of your everyday business, Dynamics 365 for Field Service is a start to finish arrangement that can enable your association to oversee complex assistance understandings, track resources and stock, oversee administration orders, rapidly distinguish and dispatch assets, and addition the insight expected to offer prescient and preventive assistance and backing. Robotize and improve booking to dispatch the correct professional and get the most incentive out of your assets. Upgrade your administration experience by proactively recognizing, investigating, and settling issues so a specialist is dispatched just when vital. Give clients self-administration entries, proactive updates, and expert following to guarantee a positive involvement with each progression. Introduction: This blog explains how to embed D365 Field Service Charts in D365 Online Portals. Steps of Implementation: 1. Get Guid of Chart and View used for Chart in D365 Field Service. 2. Create a new Web Template, Portals -> Web Templates and write code in Source field with Chart ID and View ID as copied in Step 1 as below. 3. Create a new Page Template, Portals -> Page Templates and set details as highlighted below. 4. Create a new Web Page in D365 Online Portals and set Page Template created in Step 3. 5. Create a new Link for Dashboard in D365 Online Portals. Hover Mouse on Home button and click on Edit option. Click on New button as highlighted below. Enter details as shown below and click on Save button. Conclusion: Above description in blog helps users to create Dashboard in D365 Online Portals by embedding D365 Field Service Charts as below.
Share Story :
OData API – Exposing Data Entities in D3FOE (Part 1)
Introduction: In this blog article, we will see how we can expose standard and custom data entities using OData Client code generator to OData API for CRUD operations. Steps: Install OData Client Code Generator v4 Create new Project Execute the OData Client code. 1. Install OData Client Code Generator v4: Open Visual Studio. Go to Tools -> Extensions and Updates Go to Online Fast Tab -> Visual Studio Gallery -> Type ‘OData V4 Client Code Generator’ Click Download. In the VSIX Installer dialog box, Click Install. After Installation, it will ask you to restart the Visual Studio. Click Restart now. 2. Create new Project: Click on new Project. Go to Visual C# -> Windows -> Select Console ApplicationNote: Client Code Generator can work with any project. Enter details and click OK. 3. Execute the OData Client code: In Solution Explorer, right click the solution. Go to Add -> New Item. Select OData Client. Click Add. You will see 2 files added in the solution. Open the file with .tt extension (Text Template). In the file, update the Metadata URI. Save and execute the .tt file. You can see a .cs file generated under the .tt file. Conclusion: This will generate a code that exposes all the Data Entities of D365 Operations. You can use this generated code for CRUD operations. In the next part, we will see how to use this generated code to read and write data in tables using exposed data entities.
Share Story :
Step Action in Business Process Flow in Dynamics 365 July 2017 update – Preview
Since this is in Preview, it won’t be available for users until next update. However, this is how it works and seems so easy to implement it. Enable Step Action from System Settings: Since this is a Preview feature in Dynamics 365 July 2017 update, it appears in the Previews section where you can go and enable the same. Once you’ve enabled the Preview feature, you should be able to see Action Step visible in the Business Process Flow editor as shown below: Add Action Step in BPF: You can trigger an Action or a Workflow in the Step Action feature. I have a Workflow to create a New Invitation entity record in D365. I’ll be adding the same in the BPF. In the Business Process Flow editor, I’ll add an Add Action Step in one of the stages as shown below: I’ll add the already created a Workflow to the Business Process Flow in the Step Action. Once done, I’ll simply activate the BPF and we can see it in action. Working with Step Action: Let’s see how easy it is to execute this workflow using the Step Action. On the Business Process Flow, I can see that the step appears from what the Display Name in Business Process Flow is set. And clicking on it, the workflow will run the background performing it’s operation. (You’ll see a quick ‘Processing’) message while it triggers the workflow. As seen below, the record for New Invitation was created as directed in the Workflow I created. Conclusion: Putting it simply, it works very quickly and is as simple as clicking a button.