Dynamics 365 Archives - Page 85 of 88 - - Page 85

Category Archives: Dynamics 365

Auto Complete feature in CRM 2016

Introduction In this blog we are going to discuss about the new Auto completion feature of CRM 2016. First, a disclaimer – the term ‘autocomplete’ might be a bit misleading since the field is not automatically completed but instead you can select the suggested item from the list. Requirement To use the Country text field on the address section of the Account and Contact record to enter the Country but restricting users from entering any random values. Instead, the users need to enter country codes only. The goal was to accomplish this without using lookup field on the form. For the text fields, the auto complete feature was not available in previous CRM versions. Hence instead of using text fields, we used to have either lookup fields (for many items) or option set fields (for limited set of options). Solution In CRM 2016, new methods are introduced for text fields. Using these methods, we can implement auto complete feature for text fields, where users can see the suggestions and either select any option or type its own value.   1. showAutoComplete This method allows us to show list of possible values as dropdown to add auto complete feature to text fields. As soon as we select any item under the list, it will be populated in target text field and OnChange event of that field will fire. Use this to show up to 10 matching strings in a drop- down list as users press keys to type character in a specific text field. Also add a custom command with an icon at the bottom of the drop down list. The above method can be used as follows: Xrm.Page.getControl(field name).showAutoComplete(object); This method takes object as parameter which includes results and command. Object can be defined like below: var resultset = { results: [{ id: <value1>, icon: <url>, fields: [<fieldValue1>]}], commands:{ id: <value>, icon: <url>, label: <value>, action: <function reference> } } Here, the result represents an array of possible values that we want to show under the drop down on keypress. Under the results, we can define id, for individual array item, icon to show particular icon for array items and the field where we pass values. Commands is used to define additional action on the drop down, for example opening any additional page by providing a link.   2. hideAutoComplete This method is used to hide the auto complete drop down list that is implemented using showAutoComplete method. No need to explicitly use this method because, by default, the drop down list hides automatically if the user clicks elsewhere or if a new drop down list is displayed. The above method can be used as follows: Xrm.Page.getControl(field name).hideAutoComplete() Note: Both of above methods only works with Web and Outlook client. Steps for creating an auto complete feature on single line text field are as follows: Save and publish script event OnLoad of the form. When user is going to type some character in auto complete text field, drop down list will display the list of records present. It will show only the first 10 results which are suggested. When user types some character in auto complete text field, the list of results matching the characters is shown in the drop-down. Advantages: This feature is useful when we have a master list of data from which users can select the value, at the same time users can also put data if they don’t find value in the master list. Lookup approach was restricting users from selecting data only from master list and was not allowing users to put their own values. One of the best example to this is list of Cities. Users can either select city from master list or if city is not available, then they can put their own value. Current Limitations: Autocomplete does not work on phone/tablet native apps yet. Autocomplete works only on updated entity forms. We hope this blog have given you useful information on the new Auto Complete feature of CRM. Contact us for any queries!  

Share Story :

Mobile Controls in Dynamics CRM 2016

Posted On February 12, 2016 by Posted in

Introduction Microsoft Dynamics CRM 2016 introduces new mobility features to enhance and increase the user experience for CRM apps for both Tablet and Mobile. In our today’s blog, we will go over the mobile controls in CRM 2016. Mobile Controls In Dynamics CRM 2016, Microsoft introduced 15 UI controls that can replace standard data entry field for Phone and Tablet. These controls provide more appealing, faster interaction and touch friendly experience for mobile devices. Controls are added on Fields under Form Customizations as show below.   Under Controls Tab, Control added for that particular field and can be enabled for phone, tablet or both. For the control added, user needs to configure the values i.e. specify the minimum, maximum and step value for that field. Calendar Control Instead of traditional list view, User can view their phone calls, appointments and meetings on a calendar. This control can be used on dashboard, entity list view or as sub-grid within another form. This control works with any entity that has date field. For e.g. by default, this control is enabled on Activities Area where activities can be viewed in Day, Week and Month format.   Star Rating Star Rating control can be used to replace numeric value. This control allows easy and effective way that allows to rate on the scale from 0-5.   Arc Knob This control binds the numeric value and allows user to visualize the value in arc format. This arc is configurable in minimum, maximum and step value.   Number Input Number Input control allows to quickly update number, decimal and currency fields. The value can be easily incremented and decremented with use of Plus (+) and Minus Sign (-).   Radial Knob Radial Knob allows to show numeric values with a circular presentation. So by clicking and dragging the control clockwise the value can be incremented and with anticlockwise value can be decremented based on the step configured.   Linear Gauge Linear Gauge is another control for displaying number and currency field in a linear manner. Here user can add value by simply sliding to right to increment and left to decrement the value. This control is again configurable with minimum, maximum and step value.   Linear Slider Linear slider is exactly similar to Linear Gauge control that was mentioned above but the only difference is in visual appearance. Similarly, even this control is configurable with minimum, maximum and step value.   Bullet Graph Bullet Graph is another control that works with number fields but in more attractive manner. This control is configurable with minimum, maximum value also in addition user can add up to good and bad values. This control adds shading to target value i.e. shading defines the range of good and bad area. So for e.g. if we have Probability field with min value as 1, max value as 100, good value as 90 and bad value as 50, user can see the value as represented below.   Option Set As the name suggests, this control is used with Option set fields. This control provides tabs in horizontal line with available options. So here user can simply tap on the tab and select the option set value. This control is best used for smaller number of options, where the length of the text in those values is short and easily fit in single line.   Flip Switch Flip Switch can be used on field with Two options as their datatype. So instead of check boxes and radio buttons this control adds a visual effect of ‘On-Off’ Switch manner.   Input Mask Input Mask control works with fields of data type Single Line of Text. This control helps users to fit in data with format that is specified well in before. So for e.g. For Phone number field, if user wants to have number with parenthesis and dashes then user can mask the value well in advance.   Auto Complete Auto Complete control is another control that works with fields of data type Single Line of Text. This control value bounds to option set or to entity’s view. So when user enters data it provides quick way of entering data from the source that is provided thereby enhancing the speed.   Pen Control Pen Control is way to use touch feature of mobiles or tablets. This control enables users to capture the value in form of free from drawings, signatures or text. This control is available on fields with data type as Multiple Line of Text.   Website Preview As the name suggests, website preview control provides the glimpse of web URL that is specified in the field. This control works on field with data type as single line of text URL. Note: This control is only available on CRM Online Organizations   Multimedia Control Lastly the final control i.e. the Multimedia Control, this allows users to play the multimedia files directly within the application. This control works with field of data type Single line of Text in URL format. Note: No controls can be added on fields with data type as Lookup or Date and Time. Conclusion Thus with Microsoft Dynamics CRM 2016, these were the 15 new mobile UI controls that can be enabled for both Mobile and Tablet with seamless user interaction.  

Share Story :

Change Primary Address of Account/Contact records in Microsoft Dynamics CRM

Introduction In CRM, an account or a contact can have more than 1 address out of which primary address is shown on Account/Contact form in address fields. This blog explains how can we set any other address as a primary address and show on the form. Requirement: An account can have more than 1 address which are shown under more addresses tab of an account record. The Primary Address is always shown on Account form and it is not shown under More Addresses section. User has customized address entity and added a checkbox field on Address form to decide whether the address is primary address or not. Now when user sets this field as True, the address should become primary address on account/contact form and existing primary address should be shown under more addresses section. How addresses are stored in CRM? Addresses in CRM are stored in Address entity. Address entity has unique identifier field as Address Number for each of the parent record i.e. either Account or contact. Whenever an account or contact is created in CRM, by default 2 address records are created in Address entity for the respective account or contact record. Address Number of the primary address is always set as 1. For one account or contact, address number field cannot contain duplicate values. Solution to the requirement As primary address is identified with the help of Address Number field, i.e. when Address Number is set as 1, it becomes primary address. Hence, when user sets the checkbox to YES, we just have to change the address number field to 1 to make that address as a primary address. On main form of account or contact, details of address will be shown where account number is 1. Catch in the solution: As already said above, for one account or contact, address number field cannot contain duplicate values, hence if we directly try to set address number field to 1, it will throw an error saying duplicate record found. Below is the solution to this problem. Deploy a plugin on update of ‘Is Primary’ field on Address entity We will see the solution with the help of below example:   Assume we have A. Datum account with 5 addresses. Account Name Address Number Is Primary? A. Datum 1 YES   2     3     4     5   Now, User updates ‘Is Primary’ Field of Address 5 as YES. Below is the data update done by User. Account Name Address Number Is Primary? A. Datum 1 YES   2     3     4     5 YES Below data operations should be performed in Plugin. Step 1: Account Name Address Number Is Primary? A. Datum 1 YES   2     3     4     0 YES Step 2: Account Name Address Number Is Primary? A. Datum 5 NO   2     3     4     0 YES Step 3: Account Name Address Number Is Primary? A. Datum 5 NO   2     3     4     1 YES  

Share Story :

Open Table Browser with different legal entity in AX 7

As developer, we work on different legal entities to customize data. Generally, DAT is the default entity in AX 7 but we wonder how to use data of other legal entity. In this article, we will tell you how to open Table in Table browser in Visual Studio with different legal entity (USMF) by modifying settings from Dynamics AX Online. Go to System Administration > Users > Users in Dynamics AX Online.   Select the user for which you want to change the Company Id and click Edit.   In the Company column change the Company Id to USMF.   In Visual Studio open the table browser. Table will open with data of selected company that is USMF.   So, this is how we can open Table in Table Browser in Visual Studio with different legal entity. Let us know your reviews. We will soon come with more articles, as we further explore AX 7.

Share Story :

Convert Email in Queue to Case (Interactive Service Hub in CRM 2016)

Posted On January 20, 2016 by Posted in

Introduction This blog would help to understand how to create a case from an email in the queue in Interactive Service Hub, CRM 2016. Here the User need not need to create a case Manually for the issue reported in the Email coming in Queue.   Ever since using the Interactive Service Hub from the beginning there was a question whether an email can be converted to Case or not? If you open the email in the Service queue, there appears to be no option for converting it to case. Finally, we have found a way wherein you can convert an email to case. Let’s have a look how to do so.   Description Steps that we need to follow are shown below. Below snapshot shows all items (emails) in Support Queue.   Open the email item.   Click on Reply or Reply all.   Once we click on Reply, Click on More-> Convert TO -> Case.   Enter the Customer Name and Subject to create a new case.   Finally the case is created. Enter the mandatory details and save it.   Conclusion Finally, we can conclude that the conversion of an email to case in the Interactive Service Hub, CRM 2016 is possible.  

Share Story :

Mobility Feature in CRM 2016 – Task Based Experience

Posted On January 19, 2016 by Posted in

Introduction This Blog post tells users about one of the Mobile features in CRM 2016. Task Based Experience enables users to focus on tasks and not on records. So data from multiple entities are brought together as a single user experience. Here user do not have to navigate on multiple entities for performing a single task. Pre-Requisites Under System Settings first user will have to enable this feature. Functionality So, by default users can perform three basic tasks: After Meeting Make Contact on Opportunity Update Contact Whereas if user wants some customized Business Process Flow to be enabled as Task on Mobiles, that can be done by using Task Based Experience feature in CRM 2016. On Mobiles this feature can be used by icon which is present on bottom left hand side as shown below. Let’s see how the default tasks can be used on mobile. 1. After Meeting After Meeting enables users to edit the list of existing appointments or to create a new appointment. For an example the below screenshots shows how to update the existing appointment. 2. Make Contact on Opportunity As the name suggests, this task enable users to update the contact details on existing opportunity list or to create a new opportunity and then add contact details on the newly created opportunity. So, in the screenshot given below, user can update the contact details on the opportunity that was selected. 3. Update Contact Update Contact enable users to edit the contact details that are listed or to simply create a new contact record. Example: Here user can select a contact record and simply update the record. Whereas if a user wants to have a separate Task to be enabled for mobile that can be done by creating a Business Process Flow in CRM 2016. So let’s say if we want to create a Task for ‘Service Case’ on Case Entity.   Step 1: Under Processes, create Business Process Flow.   Step 2: Add Label, Source and Field Values. Once the Process is ready, save and activate the process.   Step 3: User when clicks on icon, here they can see one new task ‘Service Case’ apart from the default tasks that were mentioned earlier.   Step 4: Now user can create a case from the enabled process on Case Entity.   Note: Task based experiences will be available on phones and tablets as a preview feature for Dynamics CRM Online 2016 customers Conclusion So with task based experience feature in CRM 2016, user can perform tasks from one single point instead of navigating to multiple entities.

Share Story :

Document Generation in Dynamics CRM 2016

Posted On January 15, 2016 by Posted in

In this article, we will review the new and improved out-of-the-box capabilities to generate documents that contain data from CRM records. Users can now create Word and Excel templates for letters, agreements, quotes, invoices and other, in just a single click! Out of the box Templates Out of the box, here are the templates Microsoft includes with the CRM 2016 release Figure 1.0 1   To run the Template you’ll first need to select the appropriate record. For the Account Summary Template, select an Account record and select it from the Action menu. As shown in Figure 2.0 1. Figure 2.0 1   Account (Cloudfronts Technologies LLP) Summary template is generated. Figure 3.0 1   Open the Account Summary.docx file. Figure 4.0 1   Create a new Excel Template Go to Settings – Templates – Document Templates. Click on +New to launch the wizard. Here you can select either Excel or Word templates, the entity and the View. The Edit Columns link provides users a quick way to add columns to the template similar to that of an Advance Find. CRM knows where to display the template file based on the entity selection. If you already have a template, choose Upload, otherwise choose Download to see what CRM created as the Template based on your field selections. Figure 5.0 1   To upload a file we need to just drag & drop in the box and click the upload button Figure 6.0 1   Once the upload is complete, the template record is displayed. Figure 7.0 1   Once you have selected the Template, you also have the ability to set the security roles and control. Figure 8.0 1   Create a Word Template Go to Settings – Templates – Document Templates and click +New. Choose the Word Template, select the entity and press Select Entity button. Figure 9.0 1   A wizard form opens to provide options in navigating across various entities depending on the relationship types. Figure 10.0 1   The relationships you select on this screen determine what entities and fields are available later when you define the Word template. Only select relationships you need to add CRM data to the Word template. Click Download Template on the Select Entity page to create a Word file on your local computer with the exported entity included as XML data.   Enable the Developer Tab Open the Word template file. At this point, the document appears to be blank. Figure 11.0 1   For To see and add CRM XML data, you need to enable the Word Developer tab. Go to File > Options > Customize Ribbon, and then enable Developer. Figure 12.0 1   Developer now appears in the Word ribbon. Figure 13.0 1   You use the XML Mapping Pane to add CRM entity fields to your Word template. Be sure to only add fields as Plain Text or Picture. Figure 14.0 1   Define the Word template Use the XML Mapping Pane to define the Word template with CRM entity fields. In your Word template, click Developer > XML Mapping Pane Figure 15.0 1   The default XML schema is selected. Select the CRM XML schema. It will begin with “urn:microsoft-crm/document-template/”. Figure 16.0 1   Expand the CRM entity, right-click the entity field, and then clickInsert Content Control > Plain Text. Figure 17.0 1   The CRM entity field is added to the Word template. Add additional entity fields, add descriptive labels and text, and format the document. A completed template might look like this: Figure 18.0 1   Some content control fields you entered likely have multiple lines of data. For example, accounts have more than one contact. To include all the data in your Word template, set the content control field to repeat. Set content control fields to repeat Put fields with repeating data in a table row. Select the entire table row in the template. In the XML Mapping Pane, right-click the relationship containing the content control fields, and then click. Figure 19.0 1   When you use the Word template in CRM to create a document, the table will populate with multiple rows of data. When the template has the fields and formatting you want, save it and upload it into CRM.   Upload the Word template back into CRM When you have your Word template built the way you want, save it so you can upload it into CRM. To use the Word template you’ve created, do the following: Open a record with information you want to create a document. For example, open a customer account record in Sales. ClickMore (…) > Word Templates, and then under Word Templates select the template you created.   Once generated, documents can be downloaded and then printed, shared, emailed or collaborated on with Microsoft Office 365  

Share Story :

Known issue when using Web API with Alternate key feature

Posted On December 21, 2015 by Posted in

Introduction With the release of Web API, Dynamics CRM now allows developers to build robust solutions and integrations using modern REST APIs consumed through OData. While working on a CRM customization by leveraging the Web API, we found an issue that causes the API to stop working when we use the Alternate Key with the same name as the schema name of a field. This only applies to custom entities. In the section below we have defined the issue and a workaround. Description Recently we were working on a requirement using the CRM web API but we were not able to access the web API using the entity endpoint. When calling the endpoint from the browser, instead of displaying the metadata result in the browser, it generates an error. It simply says that the ‘Object reference not set to an instance of an object’ (we love this error!). This typically happens when during coding we forget to initialize the object. So getting this particular error when calling our endpoint, we were confused. Microsoft has now confirmed that this is a known issue and they will resolve it soon. But for now, the only fix is to delete the key and publish the customization. So we removed the alternate key and generated a new one. This got the endpoint working again! We were not able to understand how an alternate key will stop the web API from working. They ask use to delete the alternate key from the system which we had created recently. As soon as we deleted the key and published the customization we found that the WEB API working. Example: The below screen shots confirm the issue. Step 1: Browse to the Web API endpoint. You can see that it works.   Step 2: Define Alternate Key – to replicate the issue we created a field and an alternate key with the same name-   Step 3: Browse to the same endpoint – Now when trying to browse to the same endpoint we get the below error- Conclusion So there is a known issue when using Web API and Alternate Key for custom entities. Currently there is no resolution to this issue but to delete the alternate key and have a unique name which does not match with name field ‘s schema name.   Hope you found this useful!  

Share Story :

Agile project implementation methodology at CloudFronts

We have been hearing a lot about Agile Methodology for project implementation. But, we also need to see if it is the right choice for Dynamics world. Agile in short says “Do not wait till end, rather let’s see the deliverable in pieces”. Well, that’s justified too. Clients here get to see their baby at regular intervals. Each delivery sprint can go in a controlled manner from End-to-End delivery cycle like the complete projects does, excluding the deployment phase, which happens at the end of the last Sprint of the project. We at CloudFronts practice Agile for all the project implementation. In fact, our PSM solution is getting redesigned to suit the needs of such Agile project implementation. This is done in order to help project managers keep the data intact in CRM and do not scatter it in multiple excel files. Right from Project creation to Resource allocation to Gantt Charts to Time sheet’s we keep all of it inside CRM so that the PM is in pace of the project and all is in single place. Agile generally demands clear requirements for the project to be implemented. Keeping this in mind the project moves through Sprints. The following image illustrates “Where does Sprints come into picture”. We too follow the standard practise dictated by Agile: Daily stand up meeting Iteration planning Unit testing Release planning Burndown/team-based estimation Coding standards Continuous integration Automated builds The project planning is done in MS Project in Sprinted approach. Though MS Project is not the ideal tool to do Agile Planning but taking the advantage of its flexibility that allows us to do it.   We have the following documents in place for each Sprint and the Sprints coming ahead: Daily Agile task allocation Sheet: This is an Excel sheet where we allocate the tasks to the team during the daily stand up meeting and mark the Pending tasks that are incomplete. Sprint Document: This contains the following 4 things: Achievable Backlog Completed Other Remarks All the incomplete tasks from previous sprint are move to next sprints Backlog section. This also then becomes the part of the current sprint. There are multiple benefits of following Agile: Development process gets streamlined and simplified. Higher rate of customer satisfaction. Reduces risk. Improves project Visibility. Success rate for project goes higher by 70% Reduces the cost of development. So, this is what CloudFronts follows as Agile practice. Hope you found this article useful. We will continue to publish more articles as we implement “Agile” that works for Dynamics projects !  

Share Story :

Custom Auto Number for Cases

Posted On December 1, 2015 by Admin Posted in

Currently in Microsoft Dynamics CRM, customer service representative creates a case to track a customer request, question, or a problem. All actions and communications can be tracked in the case entity. ID field in Case entity is automatically generated and default format is CAS-00034-Z7M9F7. This kind of Case ID will not be meaningful for many users and there might be a need to create an ID which consists of customer name so that service representative can easily identify the case just by looking at the Case ID. In today’s blog, we will show you how to generate customized Case ID with your own format as per the business requirement. Whenever a case is created Case ID field is automatically generated and lock is acquired on that field. User cannot change the ID generated. In order to achieve a custom generated Case ID we create a plug-in and do customizations in CRM. Here we are considering an example where Account entity is been used. The Case ID generated is like “3-003” where ‘3’ is the unique account number and ‘003’ represents the 3rd case for respective account. When 4th case is created on same account, the counter increases and the Case ID generated will be “3-004”. Thus track can be maintained on cases for different accounts just by seeing the Case ID. In order to get Custom Auto Number on Case Entity follow the below steps: 1) Plug-in: Create a synchronous PRE CREATE plugin on Case entity. The code for case number generation public void Execute(IServiceProvider serviceProvider) { if (serviceProvider != null) { this.context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext)); //// Obtain the organization service reference which you will need for web service calls. IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory)); this.service = serviceFactory.CreateOrganizationService(this.context.UserId); } if (this.context.Depth > 2) { return; } if (this.context.InputParameters.Contains(“Target”)) { if (this.context.InputParameters[“Target”] is Entity) { //// Obtain the target entity from input parameters Entity casenumber = (Entity)this.context.InputParameters[“Target”]; this.CaseNumber_Generation(casenumber); } } } // Case Number generation private void CaseNumber_Generation(Entity casenumber) { Entity result = null; string caseNumber = string.Empty; string accountNumber = string.Empty; string counterValue; int caseCounter; if (casenumber.LogicalName == “incident”) { if (casenumber.Attributes.Contains(“customerid”)) { EntityReference customerId = (EntityReference)casenumber.Attributes[“customerid”]; //// Retrieve related account. QueryExpression customerquery = new QueryExpression(“account”); customerquery.ColumnSet = new ColumnSet(“new_casecounter”, “statecode”, “accountnumber”); customerquery.Criteria.AddCondition(new ConditionExpression(“statecode”, ConditionOperator.Equal, 0)); customerquery.Criteria.AddCondition(new ConditionExpression(“new_casecounter”, ConditionOperator.NotNull)); customerquery.Criteria.AddCondition(new ConditionExpression(“accountid”, ConditionOperator.Equal, customerId.Id)); EntityCollection customerresult = this.service.RetrieveMultiple(customerquery); if (customerresult.Entities.Count > 0) { result = customerresult[0]; accountNumber = result.GetAttributeValue<string>(“accountnumber”); counterValue = result.GetAttributeValue<string>(“new_casecounter”); bool counterResult = int.TryParse(counterValue, out caseCounter); if (counterResult) { caseCounter = caseCounter + 1; } if ((caseCounter >= 1) && (caseCounter < 10)) { caseNumber = string.Format("{0} - 00{1}", accountNumber, caseCounter.ToString(CultureInfo.InvariantCulture)); } else if ((caseCounter >= 10) && (caseCounter < 99)) { caseNumber = string.Format("{0} - 0{1}", accountNumber, caseCounter.ToString(CultureInfo.InvariantCulture)); } //// Case Number update Entity caserecord = new Entity("incident"); caserecord.Id = casenumber.Id; casenumber["ticketnumber"] = caseNumber; //// Case counter in account entity updated Entity accountrecord = new Entity("account"); accountrecord.Id = result.Id; result["new_casecounter"] = caseCounter.ToString(CultureInfo.InvariantCulture); this.Update(result); this.recordguid = caserecord.Id; } } } } // Method for updating any entity. private void Update(Entity caseRecord) { this.service.Update(caseRecord); }   2) Customizations in CRM Add Counter field to the entity whose values you will use in Case ID. Initialize the counter field to 0 Hide the counter field.   Example We can consider an example where case number is generated through plugin. Requirement is to create Case Number with respect to the account selected. Whenever a new case is created on that particular account, counter increases and case Id is generated. Create an account with name “Anay Industries”. Account number- Unique identifier for account created. Case Counter- By default it is set as 0. This is hidden field and whenever a new case is created the counter increases by 1. Case ‘Auto number generation’ is created with Customer “Anay Industries” Anay Industries has Account Number- 3 and Case counter-2. When this case is created Account Number is selected and counter is increased by 1. When the record is created Case ID “3-003” is generated where ‘3’ is the Account Number and ‘003’ is the case counter. Conclusion Although our example was simple, you can generate complex case numbers as well by applying a different logic. We hope this have given you a useful information on generating automated Custom Case Number.

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange