Category Archives: D365 General
Issues with uninstalling ADX Portal from Microsoft Dynamics CRM Online and how to tackle them
In this blog, we shall see how can a user uninstall the ADX Portals from Microsoft Dynamics CRM Online and what are the various that a user might face while uninstalling the Adxstudio solutions from CRM before installing the new CRM Portals. Pre-Requisites: D365 CRM Portals D365 CRM Environment How to Uninstall the ADX Portals: According to ADX Studio the following is the procedure to uninstall ADX Portals from the CRM Environment: “The process of uninstalling the solutions is to delete the solutions in the reverse order they were installed. If customizations have been made that depend on any of the components in Adxstudio solutions, those customizations must be undone before a delete will be successful. Delete any suplementary Adxstudio solutions such as Adxstudio Forums, Adxstudio Ideas, etc. that may have been installed. Then delete Adxstudio Portals solution, then delete Adxstudio Portals Dependencies solution.” Process: Step 1: The user will have to go Settings in the ‘All Select Area’ and click on Solutions option. Step 2: The user will have to make a list of the Adxstudio solution that are present in the CRM Solution list. *Note: The solutions are already arranged in the grid view in descending order of their installation. The user must uninstall in that order only (with Adxstudio installer to be the last solution to be installed). The following below is the list of solution in the descending order of their uninstallation. *Note: The following list may/may not contain all the solution components of Adxstudio but consists of most of the solutions that are used in ADX Portals. Sr. No. Solution Name Display Name 1. AdxstudioIssuesWorkflows Adxstudio Issues Workflows 2. AdxstudioIssues Adxstudio Issues 3. AdxstudioIdeasWorkflows Adxstudio Ideas Workflows 4. AdxstudioIdeas Adxstudio Ideas 6. AdxstudioBadges AdxstudioBadges 7. AdxstudioCareersWorkflows Adxstudio Careers Workflows 8. AdxstudioCareers Adxstudio Careers 9. AdxstudioBlogs Adxstudio Blogs 10. AdxstudioIdentityWorkflows Adxstudio Identity Workflows 11. AdxstudioPortalsWorkflows Adxstudio Portals Base Work 12. CustomerServiceSurvey Customer Service Survey 13. AdxstudioHelpDeskWorkflows Adxstudio Help Desk Workflows 14. AdxstudioHelpDesk Adxstudio Help Desk 15. AdxstudioCommerce Adxstudio Commerce 16. AdxstudioForumWorkflows Adxstudio Forum Workflows 17. AdxstudioForums Adxstudio Forums 18. AdxstudioEventManagement Adxstudio Event Management 19. AdxstudioWebForms Adxstudio Web Forms 20. AdxstudioIdentity Adxstudio Identity 21. AdxstudioPortals Adxstudio Portals Base 22. AdxstudioPortalsDependencies Adxstudio Portals Dependencies 23. AdxstudioCRM2011ProductivityPack Adxstudio CRM 2011 Productivity Pack 24. AdxstudioInstaller Adxstudio Installer Step 3: Once all the solutions of ADX Portal are deleted or uninstalled from CRM Environment the user can then configure a new portal for the same CRM Environment. Problems Faced while Uninstalling/ Deleting solutions of ADX Portal The user might face many difficulties while uninstalling / deleting solutions from the CRM environment. One of the major problems which users mostly face is “Solution having other internal Dependencies” which prevents the solution from being uninstalled. In the below example we will try to uninstall the “Adxstudio Portal Base” solution from the CRM Online environment. Step 1: Select the ADX Portal solution that you want to delete from the system, in this case it is “Adxstudio Portal Base” solution. Step 2: On clicking the delete command the following dialog box will appear click on OK to proceed. Mostly the following error message appears as shown below(i.e. the error message pops up cause the solution that the user is trying to delete has internal dependencies), the user will have to click on ‘Details’ to view the list of dependencies. Fig 3.1 Pop up dialog to Uninstall the solution. Fig 3.2 Error message that solution cannot be deleted Fig 3.3 List of Dependency Details which are preventing the solution from being uninstalled. Step 3: The user has now the list of dependencies due to which the solution cannot be uninstalled from the CRM Environment. The user has to remove/delete the dependencies in order to uninstall the solution. If the user is able to remove the dependencies the user can proceed to uninstall the solutions. Issue Faced: Most of the times the dependencies cannot be deleted which in return causes the solution from being uninstalled from which in return causes the ADX Portal from not being uninstalled. The following are possible ways of dealing with the issue faced: Mostly the users will have to leave the solutions that aren’t being uninstalled as residual solutions and try provisioning the new CRM Portal. Else will have to wait for Microsoft to fix the following issue of not being able to uninstall the residual solution in their future updates on Portals. Conclusion: Dependencies in the Adxstudio solutions can cause the ADX Portal solution from not being uninstalled. In this case the user can try installing the CRM Portal leaving the uninstalled solutions as ‘Residual solution’. Waiting for the following issue to be fixed in further updates on portals from Microsoft.
Share Story :
Azure AD Authentication Error- AADSTS65001: The user or administrator has not consented to use the application
Recently while connecting to Dynamics 365 Operations STAGE environment through TIBCO Cloud Integration, we got authentication error of AADSTS65001. In this article, we will discuss how to resolve this authentication issue. Error details: Connection test failed: Verify that the associated connection information is valid and that you have access to this OData service. The following exception message was returned from the OData service: AADSTS65001: The user or administrator has not consented to use the application with ID ‘********-****-****-****-************’. Send an interactive authorization request for this user and resource. Trace ID: af595cf2-0b8c-4cd7-ae28-c56e18031300 Correlation ID: e1d5cece-89d1-4fda-a954-39f740c0cb4f Timestamp: 2017-04-05 08:38:45Z Solution: In Azure Active Directory, for connecting to Dynamics 365 Operations through SCRIBE we create a Native Application and use its Application ID and Redirect URI as Client Id and Authentication URL respectively in SCRIBE. TIBCO Cloud Integration Microsoft Dynamics 365 Operations Connector: AZURE Application Registration: In an Azure Active Directory, we had two Application (one Native and one Web app/API) pointing to same Dynamics 365 Operations STAGE environment; which was creating an authentication conflict. So, we changed the App ID URI in Web app/API Application. In our case, we appended /1234 in the App ID URI. After the modification, the authentication was successful. We were able to connect Dynamics 365 Operations STAGE through Scribe using the Native App’s Application ID and Reply URI.
Share Story :
Create Attachment of Signature/ Pen control data in Dynamics CRM
Introduction We already saw how to use Pen/ Signature control in Dynamics CRM in the previous blog: https://www.cloudfronts.in/adding-signature-control-mobile-tablets-dynamics-crm/ In this blog, we will see how to generate an image of the pen control data and store in Record as an attachment. Steps As we saw in the previous blog, the signature captured from phone is stored as a multi-line text field in Dynamics CRM record. And we cannot see the signature image in web browser. Now it will be a common scenario where the Users will need to see the Signature image in browser as well. This is how data is captured on Web browser. We need to write custom code which will: Read this data Convert the data to an image Store the converted image as an attachment in the CRM record For this I, have written a generic plugin which will do the above actions. You can see the core plugin code with comments below. I have also added the plugin to Github for reference: Github Link //// The plugin is registered on the Post Update on “Customer Approval” field on Opportunity. Entity entity = (Entity)context.InputParameters[“Target”]; //// The field which stores the data for Signature string signatureFieldName = “new_customerapproval”; if (entity.Contains(signatureFieldName)) { string encodedData = entity.GetAttributeValue<string>(signatureFieldName); //// Remove the additional Metadata from the text generated. int startIndex = encodedData.IndexOf(“base64,”) + 7; encodedData = encodedData.Substring(startIndex, encodedData.Length – startIndex); tracer.Trace(encodedData); string contentType = “image/png”; Entity Annotation = new Entity(“annotation”); Annotation.Attributes[“objectid”] = new EntityReference(entity.LogicalName, entity.Id); Annotation.Attributes[“objecttypecode”] = entity.LogicalName; Annotation.Attributes[“subject”] = “Customer Signature”; //// You can have any subject as required. Annotation.Attributes[“documentbody”] = encodedData; Annotation.Attributes[“mimetype”] = contentType; Annotation.Attributes[“notetext”] = “Customer Signature Attached”; //// Again, add any note text as needed Annotation.Attributes[“filename”] = “Customer Approval Signature.png”; //// OR Any name as required Guid annotation = service.Create(Annotation); } This plugin should be registered on update of the Signature control field. In this case, it is “Customer Approval”. It is preferable to have the step run asynchronously. We can now see the attachment on the record. If you have any issues or need more information, please post in the comments section below.
Share Story :
Sales Order Line error – Cannot create a record in order line. Record already exist
Introduction In this blog article, we will see how to resolve the below error while creating a record in Sales Line in AX 2012. Solution: This error causes because Sales Line has a primary index set as InventTransId and the value for it is not being generated while inserting a new record in Salesline. 1. Go to Inventory Management -> Setup -> Inventory Management Parameters -> Go to Number Sequence tab 2. Select Lot Id -> Right click -> Select View Details 3. In the General Tab -> Uncheck the manual checkbox. OR This error can also be caused because there exist unused Number Sequence list. 1. Go to Accounts Receivable -> Setup -> Accounts Receivable Parameters -> Go to Number Sequence Tab 2. Select Sales order -> Right click -> Select View Details 3. On Action Pane Select Manual Clean up -> Select current Tab. 4. On Number Sequence Form -> Select Cleanup 5. Click OK.
Share Story :
Adding Signature control on Mobile and Tablets in Dynamics CRM
Microsoft Dynamics CRM Sales Process aims to generate potential sales opportunities and gives a new lead and boost to your business. It is intended to help the business procedure from gaining another lead through the end of a deal and to create exact deals gauging. Via mechanizing and enhancing a few phases, it smoothes out the business procedure while improving the pace of the conclusion. It additionally helps track and measure each deal’s action and see each number and segment of the business pipe so as to develop pay. Utilizing the Dynamics CRM deals process, you can focus on the correct leads and construct a remarkable deals pipeline. The CRM sales process ultimately increases the revenue of a company which every organisation aims in doing by supporting the business from beginning to end Introduction: With CRM 2016, Dynamics added controls which can be used in Phones, tablets and some on web forms as well. One such important control is the signature control in Dynamics CRM. This control is available for Phones and tablets, and very important in the modern sales process. In this blog, we will see how to add Signature control on Mobile and Tablet forms. Steps: Create a Multi-line text field with minimum length greater than or equal to 15000. Let’s say the name of the field is “Customer Approval” Add the Customer Approval field to CRM form. Add the Pen Control on the Customer Approval field. Once you publish, you can now see this control on your Mobile and Tablet application. It will look like below. Note: You also need to select the check box below the signature for the app to save the data. Once Customer/ Person signs using the above, the information is stored back in CRM. Other Information: The control cannot be used on Web forms. It will look like a Text box field. So, it is advisable to have this field locked or hidden on Web. On web form, and in CRM DB, the data is stored as the base64 format inside the field. So if you open the form on CRM, it will look like below. Conclusion: Using controls for forms on mobile, and tablets vastly improves the user interface on handheld devices. It is important to understand controls and apply them at relevant places on CRM forms. PS: I will be writing another blog, which will automatically convert the base64 data of the signature and store it as an attachment on the entity.
Share Story :
Leveraging FetchXML with Dynamics CRM
Overview: FetchXML is used to query the Dynamics 365 database. A great advantage of using FetchXML is that it can be easily designed by using Dynamics 365 database and it is easy to understand. FetchXML tester is available in the XRM Toolbox which can let you test and fetch results quickly. FetchXML also provides facilities like aggregation and grouping of data. Using FetchXML: FetchXML must conform to the fetch.xsd schema provided with the Dynamics 365 SDK under the directory SDK\Schemas\fetch.xsd FetchXML must be built into a query string which can be used with IOrganizationService.RetrieveMultiple to retrieve data from Dynamics 365. FetchXML query can be saved in Dynamics 365 by creating a SavedQuery record. From the above sample query, a query can be constructed inside <fetch></fetch> tags. In the above example, I’m retrieving Contact records with the attributes Contact ID which is the Primary Key and the Full Name of the Contact. In the above query, using count=’3’ will retrieve a maximum of 3 records. Executing the FetchXML query: You can simply use the above query in the FetchXML tester provided in the XRM Toolbox and get results or you can construct a query string and use it with IOrganizationService.RetrieveMultiple() and get results in the EntityCollection object in your application. Using the above query, here’s how I can make it into a query string and retrieve the results in my application. Then, I can use foreach() to loop through the result returned in the EntityCollection. FetchXML Aggregation: The following aggregation functions are provided in FetchXML: sum avg min max count(*) count(attribute name) Example of max used with aggregation: In the above example, I’ve used the attribute aggregate=”true” in the FetchXML header and used an aggregate aggregate=”max” with the field Employee which is count of Employees in an Account. The result returned for the same was: The above result returned a formatted value of 13000 which is the max for an Account. Also, notice that the tag is <total></total> since it was the alias I used in the query. Likewise, you can use other aggregates and grouping functions. Understanding Results of FetchXML: FetchXML results are returned in the <resultset></resultset> tags as shown in the sample below: Each record is retrieved under an individual <result></result> tags. Paging: At maximum, a FetchXML query can return not more than 5000 records. If results are more than 5000, morerecords attribute in the resultset will return “1” and will be shown like below: In order to fetch further records, you’ll need to use PagingCookie. A sample code has been provided in the SDK under SampleCode\CS\GeneralProgramming\Queries\FetchPagingWithCookie.cs to leverage the same. Also, if you want to return results with even smaller numbers, you can use paging in the FetchXML tested by using the following: In the above example, I’m choosing to show only 2 records per page and I’m retrieving page no. 2 of all the records. Hope this was helpful!
Share Story :
Hide Custom Button on Create Form in D365
Introduction: This blog explains how to hide custom buttons on create form in D365. Problem Statement: We often get requirement from Client to hide custom buttons on Create record and to be shown on updating of record. Solution: We can achieve this functionality by having ribbon Customization with Enable Rules using FormStateRule. Steps of Implementation: 1. Create a new Command. 2. Create a new Enable Rule. 3. Create a new FormStateRule. 4. Set Enable Rule on Command. 5. Set Command on Button. Conclusion: Below image confirms button is hidden on Create Record and it is shown on Update Record. Create Record: Update Record:
Share Story :
Using Real time workflows for Business Validations in Dynamics CRM
Introduction: Like asynchronous workflows, real-time workflows can be used to model and automate real world business processes. Real-time workflows are for business users, for example business analysts, to implement similar functionality to synchronous plug-ins without requiring .NET Framework programming experience. How to use Real time Workflows for Custom Business Validations: Real time workflows can be used to not only implement business logic in Dynamics, but also simple and complex validations in the business flow. Let us understand this using 2 examples: Example 1: We have a business Validation that leads with employee size less than 100 should not be allowed to qualify. Earlier, we used to do this either from JS form scripting or using Plugin. But we can also use Real time workflow to achieve this, and it can throw a validation message as well to user. 1. For it to throw a validation message, we need to stop the workflow and select reason as cancelled. Then we can set the status reason as the message we want to display the user. 2. This is what the User will see if he/ she tries to qualify a lead with employee size less than 100. 3. This is the workflow that we configured: 4. You can specify the validation message in the Stop Workflow properties. Please note that Status of “Stop Workflow” should be cancelled for users to see the message. Example 2: We can have more complex validations as well using Real time workflow. 1. For example, Lets say we don’t want the opportunity to be Won unless the Account (Customer) has Credit limit greater than the Opportunity Budget Amount. We can configure this condition as well in Workflow. Refer Screenshot below: 2. And the End user will see the error message as below when he/ she tries to mark the opportunity as Won when the customer’s credit limit is less than the Opportunity Budget. Conclusion: Real time workflows are very powerful, and can be leveraged to perform server side validations in Dynamics CRM, along with real time CRUD operations and Email messages.
Share Story :
Creating Entity Lists OData Feed Using Custom JavaScript in CRM Portals
Introduction: In this blog, we shall see how can a user create an Entity List OData Feed using custom JavaScript in CRM Portals. Pre-Requisites: D365 CRM Portals D365 CRM Environment Why Use OData (Open Data) Protocol? OData provides external access to a data source via a website. Recommended for the Open Government Data Initiative. Data API for Microsoft Azure Data is delivered in JSON format unlike XML format. Use of OData for custom live reports, new feeds, external applications, or leveraged by client-side AJAX for unique Entity List UI. Scenario: In the following scenario the user will learn how to configure an Entity List OData Feed and Configure OData Display Using Client-Side JavaScript. The following below image shows the OData feed from an Account Entity List, that we are going to create using client-side JavaScript. Fig 1. The OData to be configured using client-side JavaScript Steps for Implementing Above Scenario Step 1: The user will have to first create a new ‘Entity List’ in this case a ‘Account’ Entity List by going to Portals>Entity List and click on ‘New’ and in the Entity Name input select ‘Account’ and create a view Name “Active Accounts” that will display a grid view of all the Active Accounts as shown below in the following two images. Fig 2.1 Creating a New Entity List Fig 2.2 Setting Properties for the Entity List Now, user will have to enable the Entity List for OData Feed by checking on the ‘Enable’ option and entering the details into the input fields in the OData Feed Section for the Entity List as shown below: Fig 2.3 Setting Properties of OData Feed for the Entity List Step 2: The user will have to create a Page on the CRM Portals to display the following Entity List. The user will have to use the Admin panel and click on ‘Child Page’ to create a new Page which will display the Entity List after setting the properties of the page as shown below. Fig 3.1 Setting Properties for the Portal Page that will display the Entity List Fig 3.2 Setting up the Account Entity List Page Step 3: The user will now have to obtain the OData Feed by entering ‘/_odata’ to the end of the Portal URL that the user uses to open the CRM Portals which will open a XML page as shown below. Fig 4.1 OData URL of the CRM Portal Note: The user will have to save the odata xml format and open it in another application like ‘Notepad’. Fig 4.2 XML Format of the OData Feed on CRM Portals Now in the above XML format we can see that accounts is being used as the href. To obtain the JSON format of the OData Feed the user will have to add the href used in the XML format to the end of the previously seen OData URL which is shown below. Fig 4.3 URL to obtain JSON format of the OData Feed Fig 4.4 JSON Format of the OData Feed on CRM Portals Note: The user will obtain a URL to the bottom of the JSON Format of the OData Feed which will provide the user to go to next set of records for the Entity List Step 4: Once the user has obtained the OData Feed the user will have to render the following OData Feed with a unique UI provided by ajax JavaScript on the client Side. The following is the Custom JavaScript containing the ajax call function against the OData Feed as shown below. Fig 5.1 Custom JavaScript to display OData Feed on CRM Portal Page The user will have to paste the code into the source code of the CRM Portal Page as shown below to which he wants to display the OData Feed as shown previously in the Scenario above and click on Save as shown below. Fig 5.2 Pasting the JavaScript into the Source Code Conclusion: In this way the user can implement a simple Entity List OData Feed on CRM Portals using a client side custom JavaScript.
Share Story :
Set Party List field using JavaScript in Dynamics CRM
Introduction: In this blog, we are going to discuss how to set a party list field using JavaScript in Dynamics CRM. Many times, there is a requirement that any email send from CRM must be send from a specific user, irrespective of the user logged in to CRM. Scenario: In the Incident Management, there is a need that each mail send from CRM to Customers must be send from Support User. Steps: Step 1: Write a function on load of email form. Retrieve the Queue or User you want to set from Web API Step 2: Party List basically consists of User or a Queue. So, we can set User or a Queue in party list. You can differentiate the User and Queue by specifying the Entity Type. a. Queue: “queue” b. User: “systemuser” Code is given below: var partylistData = new Array(); partylistData[0] = new Object(); partylistData[0].id = queue.value[0].queueid; partylistData[0].name = queue.value[0].name; partylistData[0].entityType = “queue”; Xrm.Page.getAttribute(“from”).setValue(partylistData); More validation can be set on basis of the requirements. On the status of the email validation can be done.