Retrieve records from NetSuite on basis of Custom field value
Introduction: In this blog, we will have a look on how the records can be retrieved from NetSuite on basis of a custom field value. Scenario: We had a client with requirement to integrate their NetSuite environment to CRM environment. The integration process from NetSuite basically triggers on the scheduled time set on the server scheduler. One of the entity that gets integrated is “Customer”. When Customer record is updated in NetSuite, a Boolean field known as “Dirty flag” is set as true in NetSuite. While integration the records retrieved are based on the Boolean field “Dirty flag”. Only the records which have Dirty flag as true are retrieved. The code that retrieves the updated records from NetSuite is as follows: The search is done based on a Boolean custom field. The search value for this field should be set as true. The above code is to search records from all the pages. The page size mentioned is 5 in the above code. Thus, each page will have maximum of 5 records on one page.
Share Story :
Add Notification method in Dynamics 365 forms
Introduction: In this blog, we are going to discuss the new feature of Dynamics 365 for form and field Notifications. The new method basically provides similar functionality like recommendation action in Business Rule. Method: addNotification This method displays an error or recommendation notification for a control. Based on the notification option selected specify actions. On Dynamics 365 mobile clients, tapping on the icon will display the messages you specified and two standard buttons: Apply and Dismiss. Clicking Apply executes the action you define; clicking Dismiss closes the notification message. Note: Setting an error notification on the control will block the saving of the form, setting a recommendation notification will not block the saving. By default, the notification level is set as ERROR if not specified. Arguments: Messages- (Array) The message that we want to display to user Notification Level- (String) Specifies if we want to display error or recommendation Unique ID- (String) Unique ID for notification Actions-(Array of Objects) Corresponding actions for the message Let’s implement a simple scenario. Based on the account type selected, the ticker symbol will be populated. If the account type is “Channel Partner User” than set the ticker symbol as “CPU” We can create a web resource and use following code: var AddTickerSymbolRecommendation = function () { var typeOfAccount = Xrm.Page.getControl(‘xcd_typeofaccount’); var typeOfAccountValue = Xrm.Page.getAttribute(‘xcd_typeofaccount’).getValue(); var tickerSymbol = Xrm.Page.data.entity.attributes.get(‘tickersymbol’); if (typeOfAccountValue == 1 && tickerSymbol.getValue() != “CPU”) { var actionsCol = { message: ‘Set the Ticker Symbol to CPU? ‘, actions: null }; actionsCol.actions = [function () { tickerSymbol.setValue(“CPU”); typeOfAccount.clearNotification(“2002”); }]; typeOfAccount.addNotification({ messages: [“Set Ticker Symbol”], notificationLevel: “RECOMMENDATION”, uniqueId: ‘2002’, actions: [actionsCol] }); } } Bind this code on change of Account type field. When user selects Channel Partner User it will show an information icon like following: When you click on the recommendation icon, you get a pop up to select Apply or Dismiss: When you click Apply respective actions are performed:
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.
Share Story :
Identify Users with System Administrator Role
Introduction: In this blog, we are going to discuss how to find the users having the System Administrator role. This can be done using the basic feature of CRM. Instead of checking all the Users separately and identifying the System Administrator(s) we can utilize the CRM feature of Advance Find. Steps: Step 1: Login to your CRM organization and click on Advanced Find located on the top toolbar as shown below. Step 2: On the Advanced Find page, click the Look for: drop down as shown below, scroll down and select Users. Step 3: Select Security Roles from the list. Step 4: After selecting Security Roles, under Fields select Name from the drop down Step 5: Enter the search string in the enter text location “System Administrator” and click Result. Step 6: Users with System Administrator role will be visible. We hope this has given you a useful information.
Share Story :
D365 Learn Developer experience updates
Microsoft made some Developer Experience Updates in different tools and Web API in order to enhance the CRM functionality and also fixed the bugs addressed to Microsoft in previous release. 1. Authentication Existing authentication flows require username + password –> Requires password maintenance –> Requires user license Server to Server Authentication –>Available in Fall 2016 release –> “Client Credentials” flow –> Authenticate with AAD using a secret or certificate –> Support for 3rd party solutions –> Does not require a user license. 2. Introducing client APIs for creating and managing records in Dynamics 365 mobile clients while working offline Use new client APIs for Dynamics 365 for phones and Dynamics 365 for tablets Utility.getCurrentPosition: Returns the current location using the device geolocation capability. Utility.getBarcodeValue: Returns the barcode information, such as a product number, scanned using the device camera. Get Barcode value Xrm.Utility.getBarcodeValue().then( function (result) { Xrm.Utility.alertDialog(“Barcode value: ” + result); }, function (error) { Xrm.Utility.alertDialog(error.message); }) Get GeoLocation Xrm.Utility.getCurrentPosition().then (function (location) { Xrm.Utility.alertDialog(“Latitude: ” + location.coords.latitude + “, Longitude: ” + location.coords.longitude); }, function (error) { Xrm.Utility.alertDialog(error.message); }) 3. Dynamics 365 Web API enhancements Access to local data while Dynamics 365 for Outlook is offline Instead of using getServerUrl() make use of getClientUrl(). getServerUrl() method is deprecated context.getClientUrl()- Return Type(string) Return entity data on create or update Create with Record URL The create request previously provided the response as shown below. Only the record Id is obtained in the response header. Create with data returned The create request after D365 update provides us with all the data of the created record. The below screenshot shows the data of the entity created as no query is specified in the URL. Now if the developer need any field data that got created such as created on, modified on fields data can be retrieved in the same create request. No need of another retrieve request. Note: This capability is applicable only for dynamics 365 (online and on-premises) You can compose your POST request so that data from the created record will be returned with a status of 201 (Created). To get his result, you must use the return=representation preference in the request headers. To control which properties are returned, append the $select query option to the URL to the entity set. The $expand query option will be ignored if used. When an entity is created in this way the OData-EntityId header containing the URI to the created record is not returned. This example creates a new account entity and returns the requested data in the response. Request POST [Organization URI]/api/data/v8.2/accounts?$select=name,creditonhold,address1_latitude,description,revenue,accountcategorycode,createdon HTTP/1.1 OData-MaxVersion: 4.0 OData-Version: 4.0 Accept: application/json Content-Type: application/json; charset=utf-8 Prefer: return=representation { “name”: “Sample Account”, “creditonhold”: false, “address1_latitude”: 47.639583, “description”: “This is the description of the sample account”, “revenue”: 5000000, “accountcategorycode”: 1 } Response HTTP/1.1 201 Created Content-Type: application/json; odata.metadata=minimal Preference-Applied: return=representation OData-Version: 4.0 { “@odata.context”: “[Organization URI]/api/data/v8.2/$metadata#accounts/$entity”, “@odata.etag”: “W/\”536530\””, “accountid”: “d6f193fc-ce85-e611-80d8-00155d2a68de”, “accountcategorycode”: 1, “description”: “This is the description of the sample account”, “address1_latitude”: 47.63958, “creditonhold”: false, “name”: “Sample Account”, “createdon”: “2016-09-28T22:57:53Z”, “revenue”: 5000000.0000, “_transactioncurrencyid_value”: “048dddaa-6f7f-e611-80d3-00155db5e0b6” } Update with data returned Request PATCH [Organization URI]/api/data/v8.2/accounts(00000000-0000-0000-0000-000000000001)?$select=name,creditonhold,address1_latitude,description,revenue,accountcategorycode,createdon HTTP/1.1 OData-MaxVersion: 4.0 OData-Version: 4.0 Accept: application/json Content-Type: application/json; charset=utf-8 Prefer: return=representation {“name”:”Updated Sample Account”} Response HTTP/1.1 200 OK Content-Type: application/json; odata.metadata=minimal Preference-Applied: return=representation OData-Version: 4.0 { “@odata.context”: “[Organization URI]/api/data/v8.2/$metadata#accounts/$entity”, “@odata.etag”: “W/\”536537\””, “accountid”: “00000000-0000-0000-0000-000000000001”, “accountcategorycode”: 1, “description”: “This is the description of the sample account”, “address1_latitude”: 47.63958, “creditonhold”: false, “name”: “Updated Sample Account”, “createdon”: “2016-09-28T23:14:00Z”, “revenue”: 5000000.0000, “_transactioncurrencyid_value”: “048dddaa-6f7f-e611-80d3-00155db5e0b6″ } HTTP headers Every request should include the Accept header value of application/json, even when no response body is expected. Any error returned in the response will be returned as JSON. While your code should work even if this header isn’t included, we recommend including it as a best practice. The current OData version is 4.0, but future versions may allow for new capabilities. To ensure that there is no ambiguity about the OData version that will be applied to your code at that point in the future, you should always include an explicit statement of the current OData version and the Maximum version to apply in your code. Use both OData-Version and OData-MaxVersion headers set to a value of 4.0. 4. Reference metadata by name Get the metadata information by the URLs specified below. 5. Discovery Service Enhancements Existing Region based discovery service Global Discovery Service With new discovery service you are able to hit a single end point which will return all the organization for a user. Available only for commercial hosted instances. Will return all the CRM versions (8.0,8.1). No need to worry about the versions used by the client. You can use the single end point to discover all the instances by using v1.0 6. Tooling Updates Tools that have been updated. Solution Packager –> Updated support for localization of Sitemap, Solution info, and BPF/Process objects –> Added support for new solution component types added for fall. Plugin Registration Tool –> Updated to support Service Bus connect string based connections only. I don’t have a connection string will be removed soon. –> Added Event Hubs support Configuration Migration tool –> The things that are common between Field Service and Project Service are added to core engine of CRM itself. –> Added support for new “specialized” types in Resource management entities in CRM CrmSvcUtil –> Updated to support connection string and better handling of option set data. Tooling.Connector (Performance is improved as it uses the string that is present in the cache, if call is made to same connection for 2nd time using the constructor) –> Added new connection string options to support creating new connections or reusing existing connections –> Updated connection fault recovery logic to better handle unexpected faults and cleanly recover connections. Tooling.CrmConnectControl –> Updated with Accessibility Support –> Added new feature to configure display language at runtime. Powershell –> Microsoft.Xrm.Tooling.Connector and Microsoft.Xrm.Tooling.PackageDeployment updated to support new logging feature to allow for better control over log files and capture of content.
Share Story :
Response Routing Rules in Surveys
Introduction After questions are added in surveys. You can add a response routing rule which helps to show hide questions or perform an action depending on the response from the client. There is a scenario when you want to ask additional questions based on responses in a Voice of the Customer survey, create one or more response routing rules for the response you want more information about. A smiley’s question is added on the form. If Satisfied or Very Satisfied is selected, display question “What do you specially like about CloudFronts” If Not engaged, Disappointed or Annoyed is selected, display question “What could we do to improve your satisfaction level” Steps to set response routing rule in CRM Add questions on the survey form that you need to hide and display Set the visibility of questions as “Do Not Display” in both the show hide questions. By default, it will be visible. To set the routing rule for the questions Click on the arrow on right side beside your record name. Click on Response Routing and then set your rule. Add new response routing rule Write name of your response routing and click on save When you save the record, sub grid “+” sign will be visible. Click on Conditions + sign and add new condition New record will be opened. Name, Survey and Response routing fields will be auto populated. You need to enter question, operator and Comparison Value. If Operator “greater” or “less”, add comparison value If Operator “selected” add the answer value. For the above requirement, fill the details as specified below. Now save and close the record. The condition is set. Now need to perform the action when the condition is satisfied. Add action for the above condition -> Click on + button -> Click on search -> Click New A new record will be opened. Fill the below details Scope- Client: Choose this if the action occurs within the survey (for example, show or hide a question). In the Client area, select the survey and the action to take, and then click Save. Server: Choose this if the action occurs outside of the survey (for example, request contact or unsubscribe). In theServer area, select the action type and select the users or queues to notify, if applicable, and then click Save. The record will not be added in the sub grid. Click on search and then select the action you created. Click on Select -> Add Now the action is added to the sub grid list. In the same way create otherwise action in the next sub grid. Add below details. Similarly create a new Routing response for hiding and showing the other question “What do you specially like about CloudFronts” when the satisfied and very satisfied smileys are selected. Create Condition, action and otherwise action in the same way. Here set the condition operator as less than and comparison value as “2” . When you show the question a corresponding hide in otherwise action also need to be set. You can see the question displayed as shown below. When Satisfied When Very satisfied When Not Engaged This is how we can set routing rules for a particular question.
Share Story :
Create surveys in Dynamics CRM 2016
Introduction After installing the Voice of Customer solution you can create the surveys based on your requirement. We had a requirement to create a survey for employees. Employees will fill the surveys and provide a feedback about the job satisfaction, relations with Managers, attitude towards the work environment depending on the questions specified in the surveys. This feedback will be stored in the CRM and will be used by HR to measure the Happiness of the Employees. According to these requirements we will create a survey. Steps to create surveys in CRM From the menu, go to Voice of the Customer -> Surveys Click New. By default, there will be a survey created in the draft state. Within the survey record some of the configuration options include Survey close date– after which responses won’t be captured Restrict multiple replies– limit respondents to 1 survey post only Anonymous responses– responses aren’t linked to CRM contacts, leads or cases Use Captcha– set controls to authenticate responses Unsubscribe– include an opt-out option on survey forms On the same form, survey runtime controls include: Theme – select which survey theme record will be applied Progress bar & page numbers– for surveys consisting of several pages Footer links– including email address, privacy policy Navigation text– change the default next / previous options The invitations and actions section in the Survey Record form includes: Email snippet– a unique survey string that will pasted into a CRM email template to direct people to the survey. This will be automatically generated by the system when a new survey is saved. Invitation link– rather than having the long snippet (above) exposed in the email invitation a call to action text can be applied instead e.g. Take our Survey Anonymous survey– if this option has been set the generic URL will be shown here for invitations Send email response– set an email template as an auto-responder when replies are posted The feedback section in the Survey form categorize the survey as Feedback survey. Generate Feedback– By default the value is OFF. If the value is OFF it means that the survey is of type response. You can set it as Automatically when survey published or Manually. Feedback Customizations – you can set the feedback entity name, solution in which you want to add this entity, schema name of the entity. The Feedback surveys creates a new entity as specified in the Feedback Customizations. You need to specify the Solution name in which you want to add this newly created entity. The responses will be tracked in this newly generated entity and can be used for analysing purpose. For every feedback survey, new entity will be generated. You need to specify the schema name of the entity. Steps to design surveys in CRM The process to define survey questions is not immediately obvious from the user interface but this can be found by toggling the designer form from the top of the survey record. By default, three type of pages will be created. Welcome page Question page Complete page You can add pages in between and define the page type. Each page has a section where we can define the category of content mentioned on the page. Question page: Individual question form records will be dragged into the section form from the right panel. In the below example, after the welcome page an introduction of the survey is mentioned. This will be mentioned as descriptive text box but this will still be defined as a Question. The next page consists of questions for employees. Here is just a few type of questions that can be dragged in to a section from the panel on the right. Short or long answers– text boxes of varying sizes Ratings– recipients give a star rating from 1 to 5 (or more) which can include half scores. Another option includes ratings by three colour coded flags Date fields – date type answer Ranking– we can ask the employee to rank the skills Net Promoter Score– a metric to define how likely an individual will recommend Customer effort Score– 5 point slider to rate how easy a client found it to deal with you A standard CSAT satisfaction metric– a standard customer satisfaction field. Smile’s rating– ask how respondents feel and capture their response in smiley that matches their mood. Publishers can choose from 9 different faces though in this release it doesn’t appear possible to upload a define new smiley icons beyond the default ones. Lists of Ratings– ask recipients to rate several items in one block. The example below has a list to ask what factors are important in choosing a new car Multiple ratings – similar to the above but using a grid of radio buttons to collect feedback per line Upload a file– enabling respondents to upload and share supporting files. Single response radio buttons– single response can be captured Multiple response tick boxes– multiple response can be captured Simple text edits to questions can be made from the designer screen, otherwise click these items to open the question record to make the changes. Rules can be set to make questions mandatory, or to show on-screen help in the event that clarification might be needed. Survey publishers can also personalize survey forms by piping data in from CRM fields, for example a customer name, CRM user, product or location. Now after adding questions you need to save and publish the survey so that you can use further. To save your work, click the Save button in the bottom right corner of the screen. When you’re done editing your survey, click Publish. After it’s published, you can do the following: To step through your survey, click Test. To preview your survey, click Preview. To create a copy of your survey, click Clone. To export translations, click Export translations. You can then access the resulting Translations.xml file from the Summary area of your survey. To copy snippets to use elsewhere in this survey or others, select the snippet (survey part or text) you want to copy, and then click Copy snippet. … Continue reading Create surveys in Dynamics CRM 2016
Share Story :
Voice of the Customer for Dynamics CRM 2016
Introduction Voice of the Customer features creating and sending out surveys to gain valuable feedback from your customers about your products or services. Respondents can take your surveys on a phone, tablet, or computer. You can see your customer’s feedback history as you work a sale or resolve a service case. In this blog we will have look on the limitations of Voice of Customer features before using it and the installation of VoC solution in CRM. Purpose of VoC Basically it is used for getting feedbacks from the customers about your products or services. You can track how satisfied your customer is with the service they received and then we can analyse the results. Availability of product Voice of the Customer is available with Microsoft Dynamics CRM Online 2016 Update and later. Before using Voice of the Customer have a look on Limitations Voice of the Customer has the following limitations designed to optimize performance: You can publish a maximum of 200 surveys. You can include a maximum of 250 questions on a survey. If you’ve enabled feedback for a survey, you can include a maximum of 40 questions. You can create a maximum of 25 pages per survey. You can send a maximum of 10,000 email invitations that include piped data in a 24-hour period. Any emails that exceed that amount will remain pending during that time and will automatically start sending when the time limit is over. Voice of the Customer will pull a maximum of 2,400 survey responses per day. Voice of the Customer allows storage of a maximum of 1,000,000 survey responses. Steps to use Voice of the Customer in CRM. Install the Voice of the Customer surveys solution Sign in to https://portal.office.com with your Global administrator or CRM System Administrator credentials. Click Admin > CRM On the Manage all CRM Online instances page, select the instance to add the solution to. Click Solutions. Select the solution you want to install and click Install. Proceed through Terms of service to accept the terms. The status for the solution changes to Installation pending. The status for the solution will change to Installed when the solution is ready. After you installed the solution, you need to accept the terms and conditions to configure it in CRM. Go to Settings -> Customizations Click Solutions Select Voice of the Customer solution In the Voice of the Customer Configuration screen, select I agree to the terms and conditions and click Enable Voice of the Customer. If you do not receive response you can click on “Retrigger response processing” Customize Voice of the Customer survey settings No much customization is needed if you satisfied with default configuration. If you have specific customizations you would like to make, change the HTML or XML of the elements. You can also import XML from an existing survey. Voice of Customer will be available in the Navigation bar. Click on Voice of the Customer and you can create your surveys and make respective changes. So this is how you can add Voice of customer solution and start creating surveys. To see how to create surveys refer our blog article Create surveys in Voice of Customer.
Share Story :
Track Event Participation
Introduction In this blog, we are going to discuss how to create a ClickDimensions Event Participation record from WordPress plugin Gravity Forms. Pre requisites In order to create Event Participation record User must have Gravity Forms plugin ClickDimensions entities (Events and Event Participation) Requirement We had a client with requirement that whenever a user registers for an event, event participation record should be created linking event and contact. Event and Event Participation are ClickDimensions entities. Solution to requirement By following the below step we can track the Event Participation records. Step 1: Create an option set field “Event” on Contact form in CRM. The field consists of list of different events that need to be displayed to the registration users. Step 2: The option set values should be same as Event records created. The name should be same as we are going to retrieve the events record based on the name. As shown here, the Event name and the Option set label are same i.e. “Conztruct Queenstown” Step 3: On the registration form, same list of events should be present in the drop down list. The value and name of the option sets should be same as option set values in CRM. Step 4: Write an asynchronous plugin which will get triggered when a contact is created or updated. When a contact is created from Gravity forms, asynchronous plugin triggers and checks if any event is registered. If registered event found in CRM, event participation record will be created. When contact is updated, asynchronous plugin triggers and checks whether new event is registered or not. If new event is registered, create a new event participation record. If event is not registered, update the existing event participation record. When existing contact is updated from CRM, asynchronous plugin triggers and it checks if the event field is empty or not. If event field is empty, the plugin stops and If event field is not empty it updates the event participation record with same contact and event. Thus Event Participation record gets created with contact and Event field associated to each other and the registration count on the event gets increased by 1. We hope this have given you a useful information on Tracking Event Participation record in CRM.
Share Story :
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!