Interactive Service Hub
What is Interactive Service Hub? Interactive Service Dashboard is a single place where Customer Service Manager/Customer Service Representative can perform all customer service related activities. This feature is introduced in CRM Online 2016 Update and is available on CRM 2016 On Premise as well. What is not supported by Interactive Service Hub? This feature is available only on Web Browser and is not available on clients like CRM for Outlook, CRM for Phones and CRM for Tablets. Right to Left (RTL) languages are not supported. e.g. Hebrew and Arabic Third party accessibility aids such as Screen readers are not supported. Keyboard navigation is also not possible in Interactive Service Dashboard. How to access Interactive Service Hub? Below are the 3 ways in which you can access Interactive Service Hub: From CRM Notifications ribbon From Settings -> Interactive Service Hub From putting URL in browser CRM Online Environments: https://<CRM Server>.crm#.dynamics.com/engagementhub.aspx CRM On Premise Environments: <your CRM Server>/<orgname>/engagementhub.aspx Internet Facing Deployed (IFD) Environments: https://< hostname[:port]>/engagementhub.apsx. Manage Different Record Types Interactive Service Hub can be enabled for any entity. By default, it is enabled for below entities: Accounts Contacts Cases Activities: Email, Task, Appointment, Phone Call, Social Activity Queue Items Dashboards Social Profiles Entities which are enabled for mobile are also available for use in the interactive service hub, but these records are read-only. Interactive Service Hub Navigation Menu Note: Navigation bar of Interactive Service Hub is different than that of CRM. In Interactive Service Hub navigation, only those entities are shown that are enabled for Interactive Experience. Like CRM Navigation, we can go to any interactive experience enabled entity from top Menu as shown in below screenshot. When you open any record in Interactive Service Hub, you can navigate between records of the view (from where record is opened) using arrow Keys. You can also see recent records similar to CRM as shown in below screenshot Or You can create records using ‘+’ sign in navigation bar. You can use Search option to search records in Interactive Experience Enabled entities. Understand new form layouts in Interactive Service Hub Business Processes In interactive service hub, business processes are shown as a process bar on forms on top. By default, the process bar is collapsed and when user clicks on any state, its fields are popup as fly out. Default collapsed view: When user clicks on stage: Entity Forms Unlike CRM forms, in interactive service hub, tabs on forms are placed horizontally as shown in below screenshot. Entity Card For interactive service hub, new form type is introduced as Card. Card is shown as a tile in interactive service hub with most important details of the record in shorter area. Below screenshot shows how cards are shown in interactive service hub. Timeline In interactive service hub, on case record, the timeline section is added to help users in tracking all case history right within the same page without navigating to multiple places. You can create any new activity, search or filter activities in Timeline section. You can also perform quick actions on the activities right from Timeline section. You can navigate to respective activity by clicking title of an activity. Related section on entity record We can see list of related records in same page of entity record form. For cases, user can directly see knowledge articles. Dashboards My knowledge dashboard This dashboard is designed to provide an overview of knowledge base articles, e.g. number of knowledge articles and their status, etc. This helps knowledge manager in knowing about expiry month of articles, number of articles to review, etc. Stream shows data from views/ queues. In knowledge dashboard, the stream shows the active articles assigned to the author. Charts provide a count of relevant records in the streams, such as articles by status reason, articles by owner, etc. Charts can be drilled down to see details. Tiles give authors numerical values to get an idea about the status of knowledge data. We can perform actions directly from dashboards without opening record. e.g. if we want to close a case without, we can directly do so from dashboard as shown in below screenshot: Customize Interactive Service Hub Forms Supported Entities Below are the only out of box entities which are allowed for interactive service hub and are by default enabled: Account Contact Case Out-of-the-box activities (phone, task, email, appointment, and social activity) Social Profile Queue Item Knowledge Article Custom entities can be enabled for interactive experience. Entity Form Types Main – Interactive experience Only used in interactive service hub. This is the main form to which is shown when user access any entity record in interactive service hub. Card Form Only used in interactive service hub. This is the form which is shown in dashboard stream areas. Quick Create This form is shared between Dynamics CRM and Interactive Service Hub. This form is used to quickly add records and is rendered vertically at the right side of the screen in interactive service hub. Quick View This form is shared between Dynamics CRM and Interactive Service Hub. This form is used to show related information of any lookup field. Reference Link How to create/design interactive forms: https://technet.microsoft.com/library/b6df6d11-9272-4c68-b516-e12c6e701622.aspx How to customize interactive service hub: https://technet.microsoft.com/library/d1446a95-14bf-4b15-a905-72fce07f4c76.aspx Work with interactive service hub form components: https://technet.microsoft.com/en-us/library/mt622060.aspx
Share Story :
Migration of Invoices from Microsoft Dynamics CRM to Microsoft Dynamics NAV
Consider a scenario where we want the Invoice generated in Microsoft Dynamics CRM to be saved in an ERP. In this article, we will migrate the invoice that is generated in CRM to Dynamics NAV using TIBCO Cloud Integration as Integration Tool. Prerequisite: CRM Online environment Dynamics NAV TIBCO Cloud Integration subscription TIBCO Cloud Integration On-Premise Agent on the server where Dynamics NAV is installed Step 1: Login to TIBCO Cloud Integration Login to TIBCO Cloud Integration (https://online.scribesoft.com/) in the server where Dynamics NAV is installed Go to Agents and create Agent from NEW option Install On-Premise Agent and copy the Agent key as well After installation, you can provide the name for the agent Step 2: Creation of Source and Target connection. Creating a new connection for CRM environment: Select ‘Microsoft Dynamics CRM’ as the Type. Provide the connection details and select ‘Cloud Agent’ for CRM Online environment as shown in screenshot below. Fig. Connection for Dynamics CRM Creating a connection for Dynamics NAV: Select Microsoft Dynamics NAV as the Type. Provide the connection details and select the On-Premise Agent which is installed on the server where Dynamics NAV is installed. Refer below screenshot for the same. Fig. Connection for Dynamics NAV Step 3: Creating solutions for maps Create a new solution. Select the On-Premise Agent. Create Advanced Map.Note: There will be two Advanced Maps in the solution. One for ‘Account’ entity migration from CRM to NAV and one for ‘Invoice’ entity migration from CRM to NAV. In the Map for Account migration: Select source connection as the CRM connection In the Query block select ‘Account’ entity Select the target connection as the Dynamics NAV connection In the Create block of the target connection select ‘NAVCustomer’ entity In ‘Create’ block map the required fields. Also we need to use the ‘Update’ block to update the ‘No’ field generated for a Customer in NAV to the ‘accountnumber’ field in CRM. We use the ‘accountid’ field as the matching criteria in the update block. Fig. TIBCO Cloud Integration Map for Account migration In the Map for Invoice Migration: Select source connection as the CRM connection Select ‘Invoice’ entity in the query block Add invoicedetail as ‘Related entity’ in the Query block Select the target connection as Dynamics NAV connection The flow for creating the Invoice and its related invoice product is as follows: Fig. TIBCO Cloud Integration Map for Invoice migration Step 1: Lookup on account entity in the source and fetch its accountnumber field (which will contain the No that we have updated in the Account migration map). Step 2: Lookup on ‘NAVCustomer’ entity by using the accountnumber fetched in Step 1 as matching criteria and fetch its Name. Step 3: Use ‘Create’ block to create the Invoice entity in NAV. Select ‘NAVInvoice’ entity in the create block. Map the fields required. Fig. Mapping for Create block in NAVInvoice Step 4: Use ‘For each child’ block for fetching the products present on that particular invoice. Step 5: Use create block in the ‘for each child’ block and select ‘NAVInvoiceSalesLines’ entity. Fig. Mapping for Create block in NAVInvoiceSalesLines Step 5:Execution of maps for account and invoice entities. Account is updated in CRM. Fig. Before execution of CRM account Fig. After execution the AccountNumber is populated with the No that is generated in NAV Customer is created in NAV. Fig. Customer in Dynamics NAV Create an invoice with this customer in CRM and Run the Map. Fig. Invoice in Dynamics NAV An invoice is created with that customer in NAV.
Share Story :
CRM → Salesforce real-time integration
Introduction We frequently come across requirements where customers use Dynamics CRM and Salesforce CRM and want to synchronize data between both the systems. We generally have requirements where data should flow back and forth from Dynamics CRM and Salesforce CRM. In this blog, I have focused on one way real time integration of Case entity from Dynamics CRM → Salesforce CRM. Requirements We have total 4 environments as per below: Dynamics CRM Development Dynamics CRM Production Salesforce CRM Sandbox Salesforce CRM Production The requirement is to perform development on development environment and then deploy the changes on production environment. There should be no code changes done on production environment and hence the solution should be configurable. Only below basic fields of Case entities should be mapped i.e. transferred from CRM Online à Case Title (Text field) Customer (Lookup of Account field) Contact (Lookup of Contact field) Description (Multiple line of Text field) Origin (Option Set) Salesforce Id (Text field – custom field to track GUID of case record created in Salesforce) Basics of Salesforce API Salesforce has list of APIs (https://developer.salesforce.com/page/Salesforce_APIs) from which we have used Partner WSDL (SOAP API). To login to Salesforce using APIs, we need to have below 3 details: User Id Password Security Token Unlike Dynamics CRM, Salesforce API uses 2 separate URLs based on environment type i.e. Sandbox/Production. Sandbox Environment uses Production Environment uses Implementation Approach To ensure no code changes on production, we have used configuration entity which will keep below configuration details: Salesforce User Id Salesforce Password Salesforce Security Token Salesforce environment Type We have used Partner WSDL to communicate between Salesforce environment and CRM Online environment. Hence based on Salesforce Environment Type, we are using login URLs. To achieve this, we have done a trick (explained below in Implementation Steps section). On create/update of Cases in CRM Online, we have written a plugin that sends data to Salesforce environment. Implementation Steps Note: I have used a separate class file that keeps all constant values. Hence whenever you find any code in all capitals, kindly replace constant values as per your requirements. Generate Partner WSDL for Salesforce environment (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_quickstart_steps_generate_wsdl.htm) Create Configuration entity in CRM with below fields: Key (text) Value (text) Create a plugin class and perform below operations in the plugin. Add web reference using downloaded Partner WSDL (https://msdn.microsoft.com/en-us/library/bb628649(v=vs.100).aspx). After adding web reference, you will see reference in Solution explorer as per below. Expand Reference.map and open Reference.cs class. Locate SforceService() method and create a copy of the same with one string parameter as per below and save the file. In plugin class, fetch configuration details from Configuration entity. It should contain 4 records. Based on the environment type, pass appropriate URL to the service to authenticate with Salesforce environment. private void ConnectToSalesforce() { LoginResult currentLoginResult = null; switch (this.dctConfigurations[CodeConfiguration.ConfigurationKeys.SalesforceEnvironmentType.ToString()]) { case CodeConfiguration.SALESFORCE_SANDBOX_ENVIRONMENT_TYPE: this.sfdcBinding = new SforceService(CodeConfiguration.SALESFORCE_SANDBOX_WEBSERVICE_URL); break; case CodeConfiguration.SALESFORCE_PRODUCTION_ENVIRONMENT_TYPE: this.sfdcBinding = new SforceService(CodeConfiguration.SALESFORCE_PRODUCTION_WEBSERVICE_URL); break; default: throw new InvalidPluginExecutionException(CodeConfiguration.ERROR_MESSAGE_CONFIGURATION_NOT_FOUND); } currentLoginResult = this.sfdcBinding.login(this.dctConfigurations[CodeConfiguration.ConfigurationKeys.SalesforceUsername.ToString()], this.dctConfigurations[CodeConfiguration.ConfigurationKeys.SalesforcePassword.ToString()] + this.dctConfigurations[CodeConfiguration.ConfigurationKeys.SalesforceSecurityToken.ToString()]); this.sfdcBinding.Url = currentLoginResult.serverUrl; this.sfdcBinding.SessionHeaderValue = new SessionHeader(); this.sfdcBinding.SessionHeaderValue.sessionId = currentLoginResult.sessionId; } Once authenticated, use the session id to perform CRUD operations. Below is a sample code. Create an object of case record to be created in Salesforce sObject caseRecord = new sObject(); caseRecord.type = Case_Salesforce.LOGICAL_NAME; Create objects of attributes of the case record XmlElement[] caseFields = new XmlElement[10]; XmlDocument doc = new XmlDocument(); caseFields[counter] = doc.CreateElement(Case_Salesforce.ATTR_CASESUBJECT); caseFields[counter++].InnerText =”Any value”; caseFields[counter] = doc.CreateElement(Case_Salesforce.ATTR_CONTACT); caseFields[counter++].InnerText =”Salesforce Guid of Contact record”; caseFields[counter] = doc.CreateElement(Case_Salesforce.ATTR_ORIGIN); caseFields[counter++].InnerText =”text value of an option from picklist”; Add attributes to an object of case record caseRecord.Any = caseFields; sObject[] caseList = new sObject[1]; caseList[0] = caseRecord; Create record in Salesforce SaveResult[] results = null; results = this.sfdcBinding.create(caseList); for (int j = 0; j < results.Length; j++) { if (results[j].success) { Entity oCase = new Entity(Case_CRM.LOGICAL_NAME, this.currentEntity.Id); oCase[Case_CRM.ATTR_SALESFORCEID] = results[j].id; this.service.Update(oCase); LogIntegrationDetails(“Record Id: ” + this.currentEntity.Id.ToString(), null, (int)IntegrationLog.Status.Success); } else { for (int k = 0; k < results[j].errors.Count(); k++) { Error err = results[j].errors[k]; } } } Key Takeaways From Dynamics CRM → Salesforce, real time integration is possible using CRM plugins and Salesforce APIs. Salesforce uses different authentication URLs for different type of environments. We have handled this scenario by modifying Reference.cs class file. Configuration entity is used to make the code configurable. We are storing back GUID of case record created in Salesforce which will be used in case of update plugin.
Share Story :
ClickDimensions Campaign Automation
In this article, we are going to see how ClickDimensions enables Marketers to create interactive automations based on prospects or user behaviours which will help to design unique paths for participants to follow as they interact with our messaging it also helps to create Lead-nurture marketing campaigns, Sales engagement campaigns, promotional or event campaigns, new customer on boarding and retention campaigns, and many more. Campaign Automations allows to set up a dynamic paths for a contact or lead to follow based on actions taken by that contact or lead. For example, if the contact fills out a form on your website than you can send them an email then wait to see if they click on Link A or Link B. If they click on Link A send them Email A, but if they click on Link B send them Email B. Navigate to Marketing > Marketing Automation > Campaign Automation. Choose New This window will open where you will need to fill in a few fields. Name [Required]: This is the name of the record as you will see it in CRM. Campaign: You may choose a CRM Campaign here if desired. This will associate this record to that CRM Campaign. Which will help us to track the ROI (Return on Investment) Completed Instances: Number of instances of Contacts and Leads who have finished running through this Campaign Automation. This is a read only field that will automatically be filled in once the Campaign Automation has been published. Owner [Required]: You will be the owner but you may change this if you’d like. Status [Read only]: This will change when the Campaign Automation is published, paused, or stopped from within the builder window. After filling out any required fields, click Save. Then click Open Builder. You will now see the canvas where you will build your campaign automations. On the right side there are Triggers and Series. Click and drag these onto the canvas. Connect them together to make a path by clicking on the green dot on the right side of the trigger and dragging to the green dot on the left side of the series. You can create a Decision Node by connecting the trigger to multiple Series. This will allow you to choose a path based on something in the previous trigger, values of form fields for example. Let’s go through each pieces of the Campaign Automation builder Triggers These are the different ways contacts/leads can be added to the Campaign Automation: Submitted For Email Interaction Added to List Manual Add Submitted Form The Submitted Form trigger may be used as an Entry Point Trigger or an Internal Trigger. If the trigger is an entry point and a contact or lead has filled out the selected form, the Campaign Automation will begin. Add a Submitted Form trigger to the canvas and click on the node. You will see the right panel change to show the properties. Display Name (Required): Once you select a form this will change automatically to the name of that form, however you may change it to whatever you would like. Select form (Required): Choose an already created form. Here we have selected Service quick start form Campaign: If you set a campaign on the Campaign Automation record this field will be populated with that campaign. You can also choose something different. This will set the Campaign field on the Posted Form record. Note: A note is an optional field for any details that need to be written about the trigger. Email Interaction The Email Interaction trigger may be used as an Entry Point Trigger or an Internal Trigger. If the trigger is an entry point an Email Send will be selected and then sent when the Campaign Automation is published. It will then check to see which contacts click or open that email. If the trigger is an internal trigger it will check for clicks or opens on any selected email(s) sent in the preceding series via Send Email actions. Add an Email Interaction trigger to the canvas and click on the node. You will see the right panel change to show the properties. Display Name (Required): Type a Display Name to show on the canvas. Select Email Send (Required): Choose a draft Email Send. Before you publish this Campaign Automation make sure to add recipients to your Email Send. Note: A note is an optional field for any details that need to be written about the trigger. Select which interaction to monitor: Email Clicked: If checked, you will be given the option to choose which links to look for. Email Opened (without click): Check this if you want to do something if someone opens the email but never clicks Selecting an interaction If Email Clicked is checked, a link to select which links will appear. Click this and a window will open with the email chosen in the Email Send lookup. As you can see in the above figure the email has got all together 9 links. Select one link, several links, or all links. If any one of the links selected is clicked, this trigger will be activated. If Email Opened (without click) is ALSO checked, you may select the amount of time to wait to see if the contact/lead clicked any of the selected links before checking to see if the contact/lead at least opened the email. If you do not select a time it will just wait to see if the recipient interacted in any way. If Email Opened (without click) is the only one checked it will just wait to see if the email was opened. Upon clicking in the canvas, you changes will be saved. To edit the node’s properties, simply click on the node and make any necessary changes. Added to List The Added to List trigger may be used as an Entry Point Trigger or an Internal Trigger. If this trigger is an entry point, any time a contact or lead is added to the specified marketing list, that contact/lead will enter the automation. To … Continue reading ClickDimensions Campaign Automation
Share Story :
ClickDimensions: Sending Customers a Specific Email Based on Form Field Submission
In this article we are going to see how to send a specific email to a customer depending on how they answer a certain Form Field. This is something which can be easily accomplished with a workflow. In our example, we have created a form asking people which EazyAPP product they are interested in learning about: Gravity forms, Client Portal or Marketing with ClickDimensions. We want customers to be sent a specific email with regards to the specific product they requested for. The form field we created is called Field Interest, and we made it a list with the three options. We then created three separate email templates that we would like to send customers based on how they answered our field. Here is the email template for customers interested in Gravity Forms: Now we can set up our workflow that allows specific emails to be sent based on how our Field Interest form field was answered by each customer. We set up this workflow to run on Posted Fields, set the scope to organization and set it to run when the record is created. For our first step, we added a Check Condition that asks if the posted field is Field Interest and the posted form is our ClickDimensions Product Interest Form. Then we asked if the value of that field equals Surveys. Remember, the value is how the data is stored in CRM, which may be different than the label that appears on your form. When the value is Surveys, we added a Create Record step and chose “Send ClickDimensions Email.” We then opened up the Set Properties and uploaded our survey email template. We also added the recipient as the Contact associated with the posted form. We then repeated these last two steps for our Client Portal and Marketing (ClickDimensions) options. Our final workflow looks like this: Now, customers who fill out our form will receive an email specifically about the product they were interested in.
Share Story :
Power BI Connectivity to PostgreSQL
Prerequisite: Power BI Desktop Tool, PostgreSQL Database, pgAdmin III, Visual Studio 2008 or higher Introduction Power BI supports connectivity to different databases such as SQL Server, MySQL, Oracle and many more (list of all supported databases given here ). By providing necessary details such as server name, database name, username & password, you can easily connect to database and start exploring data using different visualizations in the form of reports/dashboards. This article will walk you through the necessary steps required to configure in your system before establishing connection of Power BI Desktop Tool to PostgreSQL Database. After installation of PostgreSQL database in your machine, if you try connecting Power BI Desktop Tool to PostgreSQL Database, you will get following error as shown in the screenshot below: Following are the steps required to connect Power BI Desktop Tool to PostgreSQL Database: Setup PostgreSQL Client Connect Power BI Desktop Tool to PostgreSQL Steps to set up PostgreSQL Client: Step 1: Download and unzip the Npgsql package from the link mentioned here You will find two DLL files named as Npgsql.dll and Mono.Security.dll as shown in screen capture below: Step 2: You need to have Visual Studio 2008 or later. Open visual studio command prompt using administrative rights as shown in the screen capture below: Step 3: Locate and Open machine.config from the location given below: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config \machine.config .Net framework and Npgsql version might vary depending on the version of installation. Add the following below <DbProviderFactories> tag: <add name=”Npgsql Data Provider” invariant=”Npgsql” description=”.Net Framework Data Provider for PostgreSQL Server” type=”Npgsql.NpgsqlFactory, Npgsql, Version=2.0.1.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7″/> Find the screenshot given below for this step: Step 4: Now in your visual studio command prompt, use the following command to successfully move DLL files to C:\windows\assembly gacutil -I “C:\Users\ajagd_000\Downloads\Npgsql2.0.1-bin-ms.net3.5sp1\Npgsql2.0.1-bin-ms.net3.5sp1\bin\Npgsql.dll” Where C:\Users\ajagd_000\Downloads is the file location for the Npgsql package downloaded. Similar command you can run for Mono.Security.dll file gacutil -I “C:\Users\ajagd_000\Downloads\Npgsql2.0.1-bin-ms.net3.5sp1\Npgsql2.0.1-bin-ms.net3.5sp1\bin\Mono.Security.dll” Step 5: Once this is done, you can now try connecting Power BI to PostgreSQL. However you will notice below error Once you restart your machine, you can now connect to PostgreSQL and start playing with your data. Steps for connecting Power BI Desktop Tool to PostgreSQL: Step 1: Open pgAdmin III interface to create database, table and few records to display in your report as shown in screen capture below Step 2: Open Power BI Desktop Tool and click ‘Get Data’ and select PostgreSQL Database as shown below Step 3: Enter server name (in our case it is localhost), database name, username and password as shown in below screen capture Step 4: Select required table from database and click load as shown in screen capture below Step 5: Once data is loaded in model, you can start playing around with the data and create beautiful visualizations/reports as shown in image below and later publish it to Power BI Online Service.
Share Story :
Custom Auto Number for Cases
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 :
Date/Time fields in Microsoft Dynamics CRM 2015 Update 1
The Date and Time data type is used in many times such as Project Start Date, Project End Date, Date of Birth, anniversaries etc. Before the Update, CRM stored all date and time values with the user’s local time zone information. This included User Local format. The system converted the users’ local time zone to Coordinated Universal Time (UTC) for backend storage and then converted the date and time back to the local time zone for display on forms. When Date and Time data type is selected you can select different Behaviour in CRM 2015 Update 1. The need for such update is sometimes date only format caused confusion basically for Birthdays, anniversaries. Users would sometimes see a different day displayed depending on their local time zone. The different Behaviours available in CRM 2015 Update 1 are as follows User Local Date Only format always sets time to 12:00 am Time-Zone Independent format saves in UTC on the backend without converting the time-zone This date/time behaviour are not present in On-premises installation. 1. User Local Behaviour The field values are displayed in the current user’s local time. The Format available for User Local Behaviour is Date Only and Date and Time. Here Project Start Date field is set as User Local You can change the custom entity field’s behaviour from the User Local to Date Only or to Time-Zone Independent. Before changing the behaviour of date and time field, review all the dependencies, to ensure thet there are no issues as a result of changing behaviour. 2. Date Only Behaviour The field values are displayed without the time zone conversion. The time portion of the value is always 12:00AM. The date portion of the value is stored and retrieved as specified in the UI and Web services. The Date Only behaviour can’t be changed to other behaviour types, once it’s set. The Format available for Date Only Behaviour is Date Only. “Date of Birth” field is set to Date only field. 3. Time-Zone Independent behaviour The Time-Zone Independent behaviour can’t be changed to other behaviour types, once it’s set. The concept of a time zone isn’t applicable to this behaviour. The field values are displayed without the time zone conversion. The date and time values are stored and retrieved as specified in the UI and Web services The Format available for Time-Zone Independent Behaviour is Date Only and Date and Time. “Project End Date” field is set to Time Zone Independent Behaviour On change of behaviour effect on existing records 1. When Date of Birth field behaviour is changed to Date only: The Date of Birth field shown here is 9/15/2015 as entered by the user. When this field is retrieved the date/time value returned will be 9/14/2015 06:30:00 PM. Thus the date of birth visible and retrieved is different. In the database UTC date/time is set but in UI it appears different. This value is when the behaviour is user Local behaviour. Retrieve the value of the Date of Birth field and you will get 9/14/2015. Here the date/time value set will be 9/14/2015 12:00:00 AM. When the record was originally created the date entered was 9/15/2015 and I would have expected it to show as 9/15/2015. However, since the change has not been made to the existing records for this field in database, they are still stored in the original UTC format along with the time. It appears that the UTC date/time is picked and the time part is being set as 12:00:00 AM. Thus before changing, make sure about the dependent fields. 2. When Date of Birth field behaviour is changed to Time Zone Independent Here the date and time filed visible is 11/16/2015 8:00 AM. When you retrieve this field the value is 11/16/2015 2:30 AM. Thus the date of birth visible and retrieved is different. In the database UTC date/time is set but in UI it appears different. This value is when the behaviour is user Local behaviour. Retrieve the value of the Date of Birth field and you will get 11/16/2015 2:30 AM. When the record was originally created the date entered was 11/16/2015 8:00 AM and I would have expected it to show as 11/16/2015 8:00 AM. When the field behaviour is changed to time zone independent the time is been changed and data stored in database is picked.
Share Story :
Enhanced Business Process Flow
Enhanced Business Process Flow 2015 Business Process Flow was introduced in Microsoft dynamics CRM in 2013. Business Process Flows in CRM guides users through each step in a defined process to clearly see what steps have been completed, and what needs to happen next. Each stage in a Business Process Flow can be configured to include fields that the business would like to have completed for that stage. This list of fields can include any field available on that entity. These fields can also be represented elsewhere on the form. However, in CRM 2013 Business Process Flows were subject to several limitations Strictly Linear Process: Business processes are designed to work only in linear manner, no branching was allowed. Cannot Revisit The Entity More Than Once: Cannot visit the same entity again in single business process flow. No programmability support Enhanced Business Process Flow in CRM 2015 The improvement made to Business Process Flow functionality is the ability to deploy conditional logic within a defined process, (called Branches). Steps and stages can be configured easily where branching rules are defined. Selection of entity relationships – It can be optional. Branching supports – Single entity, cross entity and also supports multiple entity loops. Entity used in Business Process Flow can be revisited multiple times. Programmability through client API: Programmatically updates process state and hooks on to process events. Let’s implement these improvements in an example, consider a scenario were EazyApp Is a facetious Company which sells Software as a product. The request EazyApp receives on daily basis gets classified as leads, some of them get Qualified if they are further interested in evaluating the trial of the software and also the budget amount is greater than or equal to $5000, if not, then the lead gets disqualified. Once a lead Is interested in Trial and the budget amount is greater than or equal to $5000, the lead gets Qualified and an Opportunity gets created. Once the trial is completed, a new question is asked whether a Quote is required. If no, we close the Opportunity but if it is a yes, we create a quote and deliver the quote. After that, we offer maintenance for the product, if the Opportunity is interested in maintenance, we update the quote, and otherwise we close the opportunity. The following diagram shows a business process flow with branches. Before Designing Business process flows with Branches for EazyApp take a note of the following Information: A process can span across a maximum of 5 unique entities. You can use a maximum of 30 stages per process and a maximum of 30 steps per stage. Each branch can be no more that 5 levels deep. Branching rule must be based on the steps in the stage that immediately precedes it. You can combine multiple conditions in a rule by using the AND operator or the OR operator, but not both operators. An entity used in the process can be revisited multiple times (multiple closed entity loops). You can go back to the previous stage regardless of an entity type. For example, if the active stage is Deliver Quote on a quote record, you can move the active stage back to the Propose stage on an opportunity record. Only one active process per a record is possible. The stages can be reordered using the MOVE UPor MOVE DOWN arrows within the branch. The stages can’t be moved from one branch to other branches. Let’s look at the example of the business process flow with branches, for EazyApp selling Software as a product. First, we’ll create a new process named EazyApp Business Process Flow. Go to Settings > Processes. Specify the Category as Business Process Flow and for the primary Entity choose Lead. Add the first stage to the process called Qualify and add steps Purchase Time frame and Is Interested in Trial. After the common Qualify stage, we split the process into to two separate branches, by using the If-Else clause. Notes To add the first branch for a stage, choose Add branch below the stage and specify the If condition. To add the second branch for the same stage, choose Add branch again, below the same stage. The Else clause will be displayed. You can choose Else, to convert it to Else-If, if you have more than two branches from the same stage, or if you want to enter a branch only when certain conditions are satisfied. Choose the green square + (plus) button under the branching rule, to add another condition to the rule. Choose the + Insert stage button to insert a stage at the beginning of the branch. If the Is Interested Trial = Yes & Budget Amount is greater than or equal to $5000 the process branches out to the Trial stage, otherwise, it jumps to the Close stage, in the second branch, as shown below. As you can see above, it will apply ‘if’ criteria to check condition, where we can specify field criteria and save the condition. Once it is saved, it will allow you to insert stage on that basis as shown below. It also allows to add else condition if the criteria to flow the process in another direction is not fulfilled. You can combine multiple conditions using and/or branching techniques as shown above. Here, it will also allow you to set relationship with another entity. If no relationships exist, then you can set it to none. Likewise, you can create complete Business Process Flow and it can be used as shown below: Likewise, you can create a complete Business Process Flow and it can be used as shown below: As you can see below, it currently shows only two stages ‘Qualify’ and ‘Close’ and the step ‘Is Interested in Trial’ shows value as No. If you select ‘Is Interested in Trial’ as yes & Budget amount more than or equal to $5000, it will change the flow with additional stages as shown below: Similarly, after qualifying the lead, it will go to another stage where if you select ‘Quote required’ as yes, it will show some additional stages as ‘Deliver Quote’, ‘Offer Maintenance’ etc. as shown below: This is how you can include business process flow … Continue reading Enhanced Business Process Flow
Share Story :
Filters available in AX 2012
Filters plays a very important role in getting the data in a fast and easy manner. AX is designed in such a way that the filters can be used on all the forms. The user can filter the data by providing syntax in the filter field available on the form or by clicking Ctrl+ G. When the user clicks Ctrl+G, a new row is created below the column header of the grid. The following filtering and query options are available when you use embedded filters or queries. Syntax – Value Character Description – Equal to the value entered Description – Type the value to find. Example – Alex finds “Alex”. Syntax – !Value Character Description – Not Equal to the value entered Description – Type an exclamation mark in front of the value to exclude. Example –!Alex finds all values except “Alex” Syntax – From-value..To-value Character Description – Between the two values entered separated by double periods. Description – Type the From value, then two periods, and then the To value. Example – 10..30 finds all values from 10 to 30. Syntax – ..value Character Description – Less than or equal to the value entered Description – Type the two periods and then the value. Example – ..50 finds any number less than or equal to 50. Syntax – .. Character Description – Greater than or equal to the value entered. Description – Type the value and then the two periods Example – 50.. finds any number greater than or equal to 50. Syntax – >value Character Description – Greater than the value entered. Description – Type a greater than sign (>) and then the value. Example – >20finds any number greater than 20 Syntax – <value Character Description – Less than the value entered. Description – Type a less than sign (<) and then the value. Example – <50 finds any number less than 50 Syntax – value* Character Description – Starting with the value entered. Description – Type the starting value and then an asterisk. Example – S* finds any string that starts with S Syntax – *value Character Description – Ending with the value entered. Description – Type an asterisk and then the ending value. Example – *ltd finds any string that ends with ltd. Syntax – *value* Character Description – Contains the value entered. Description – Type an asterisk, then a value, and then another asterisk. Example – *pvt* finds any string that contains pvt. Syntax – ? Character Description – Having one or more unknown characters. Description – Type a question mark at the position of the unknown character in the value. Example – Sa??abh finds “Saurabh” Syntax – value,value Character Description – Matching the values entered separated by commas. Description – Type all your criteria separated by commas. Example – 30,80 finds exactly “30” and “80”. Syntax – T Character Description – Today’s date Description – Type “T” Example – Enter T and click Tab/Enter, it will bring todays date. The above provided syntax are very useful in day to day activities in AX. User can use the syntax in combination also, by using “&” syntax.
