Monday 26 December 2016

Set Up CRM Portal in Dynamics CRM 365

Dynamic CRM 365 - CRM Portal







Dynamics CRM 365 is shaping up to be a one of the largest updates to CRM with the inclusion of new application extensions, Project Service, Field Service and most interesting CRM Portals.. 

Introducing of CRM Portals really removes a lot of the previous barriers there was to self-starting your installation and portal deployment, with a couple of clicks now you can get CRM Portals up and running with a ready to use scalable public facing site.

The following instructions will help you to set up newly integrated CRM Portal websites for your Dynamics CRM 365.

Step 1 Create Dynamic CRM 365 trial using below link:


https://signup.microsoft.com/Signup?OfferId=bd569279-37f5-4f5c-99d0-425873bb9a4b&dl=DYN365_ENTERPRISE_PLAN1&Culture=en-us&Country=us&flight=AdminOnCustomization&ali=1


Step 2 Click on 'Admin' 





















Step 3 Navigate to 'Admin Center'








































Step 4 Navigate to 'Dynamics 365'












































 Step 5 Select your CRM Instance and Click on Solution 'Edit'.


















 Step 6 Once your Portal is installed, Go to 'Application' tab and click on 'Portal Add-On' to configure Portal settings.



              


 Step 7  Select the Portal you want to install in your CRM instance and Click on 'Install'. and Wait until solution not get fully installed.
























Step 8 Enter below mentioned details to configure the Portal in your CRM instance.



Step 9 Hit Portal URL in browser.


You will be asked to login again and accept to provide certain permissions to access Dynamics 365 (CRM) and Office 365 data.


Step 10 Click Accept


Portal requires below permissions:

Read directory data – Allows the app to read data in your organization’s directory, such as users, groups and apps, without a signed-in user.


Enable sign-on and read users’ profiles – Allow users to sign in to the application with their organizational accounts and let the application read the profiles of signed-in users, such as their email address and contact information.

Go and have cup of coffee…Your CRM Portal is getting ready in few mins...   :)







Saturday 24 December 2016

Use OData Query in ADXStudio

As we know Adxstudio Portal is now one of the most used Web Portal integrated with Dynamic CRM and one of the most common requirement and frequently asked question by developers is How to use retrieval query on Portal to fetch data from CRM.

One of the most common requirement on Portal is to auto populate data in entity forms fields based on lookup value.

For Example : As soon as user select customer in Customer lookup field, I want to auto populate selected customer entity data on case entity form fields (customer email, mobile phone, company name etc). Like this there might be so many requirement to fetch CRM data on portal conditionally.

Before going through the usage of OData in Adxstudio Portal first let us understand what is OData.

What is OData ?
OData is also referred as Open Data Protocol. Dynamic CRM mainly uses Windows Communication Foundation (WCF) data services framework to provide OData Endpoint which is nothing but a REST based data service. The address for the endpoint is:

https://{OrganizationRootUrl} /XRMServices/2011/OrganizationData.svc

How to use OData in Adxstudio Portal ?

I have been asked so many times for how to use OData Query in Adxstudio Portal,

Below are the steps to use OData query in adxstudio :-

Step 1 - Create Entity List in CRM with below mentioned configuration.

Name of Entity List, Entity Name, Website, View, OData Feed - Enabled,Entity Type Name, Entity Set Name, View





Step 2 -  Test OData.


Hit your portal url  on browser in below mentioned format.

<Portal Url>/_odata   -  This will give you all Entity list in which you have enabled OData Feeds.





Hit your portal url  on browser in below mentioned format.

<Portal Url>/_odata/<Entity Set Name>   -  This will give you the result of OData on browser.

Step 3 -  How to use OData in JavaScript (on Entity Form/Web Form/Entity List/Web Page/).


// Start Case Retrieval code

var GetResolvedCases = "~/_odata/cases?$filter=statuscode/Value eq 1";

or

var caseGuid = 'A237C638-F47B-E611-80F2-5065F38BF2F1';

var retrievebyGUID = "~/_odata/incidents?$filter=incidentid%20eq%20(guid%27" + caseGuid + "%27)";

$.ajax({
    type: "GET",
    url: GetResolvedCases,
    dataType: 'json'
}).done(function (json) {

    var CaseColl = json.value;

    // Get Case ticket number
    if (CaseColl[0].ticketnumber)
    {
        CaseId = CaseColl[0].ticketnumber;

    }
})
})

// Case Retrieval code End


Using above code you can get Case ticket number, if you are familiar with Dynamic CRM OData query then you can make query as per your requirement, or you can refer below link to know more about OData query syntax and uses.

Note : Refer below link for more details about how to write OData Query in CRM/Portal

https://msdn.microsoft.com/en-us/library/gg309461(v=crm.7).aspx


Saturday 1 October 2016

Subgrid Issue in ADXStudio


Here are some important points regarding subgrid behavior in ADXStudio :
  • You will not be able to see Subgrid or Subgrid record on entity forms if the form is in Create or Insert mode.
  • ADXStudio Subgrid behavior is same as CRM Subgrid, which show '+' icon above grid once you save the parent record.
  • Subgrid will not be render on your Entity Form until you will not pass Parent record guid in Query String as parameter in URL
  • Go to Redirect section of Entity Form(that is on Insert Mode) where you will find two options "or Webpage" and "Record Id Query String Parameter name".
  • Create a new webpage and also create a new entity form which will be same as above entity form but this entity form will be in Edit mode.
  • Attach this newly created Edit mode entity form with newly created webpage.
  • Now select this new webpage in "or Webpage" lookup of  your Insert mode Entity Form.
  • Write id in "Record Id Query String Parameter name" box.
  • Now you are done, as soon as you will submit the Insert mode Entity form, you will be redirected to newly created entity form (Edit mode) by passing its guid in query string.
  • Its bit complex, but this is the way how we can show Subgrid in Entity form which is in Insert Mode.

I had faced this issue and spent lot of days to sort out this issue, but finally i come up with above solution. Hope it will help someone to get rid of this issue.

Below are the settings required on ADX Entity form :



When the Entity form is in Insert mode Subgrid will be shown like this :


Subgrid on Entity Form :



Fig :URL of Entity Form on Portal in Insert Mode 


When the Entity form get Submitted Subgrid will be shown like this :















Fig :URL of Entity Form on Portal after submission 


Friday 30 September 2016

ADXStudio - Set values in Lookup fields of Entity Forms

This is one of the common requirement in ADXStudio to set values in Lookup Fields in Entity Forms. Initially it was very difficult for me to get the solution of this but finally i got the way. Here is the solution :

Suppose we are exposing Case Entity Form on ADXStudio Portal and we have a Customer Lookup on that form and i want to set value in this lookup field-

Step 1 : Get Lookup IDs

Right Click on Lookup Field and Click Inspect to see rendered HTML or press F12. You will find three IDs of that lookup field:

Name ID ; customer_name
Guid ID : customerid
EntityName ID : customer_entityname

Same for other lookup you will find same IDs but with different names.

So same as CRM Lookups, ADXStudio also keep three values for each lookup rendered on portal forms.










Step 2: Set values in Lookup Fields

Write below JavaScript in Custom JavaScript Section of Entity Forms

$(document).ready(function(){
    $("#customer_name").attr("value","A J E CALDER LTD");
    $("#customerid").attr("value","0a4d0c86-4253-e611-80f0-5065f38b75b1");
    $("#customer_entityname").attr("value","contact");
});


In first line i have set the name of record, in second line i have set the guid and in third line i have set the name of entity to which this record belongs.

So this way we can set value in any of the lookup field in ADXStudio Entity Forms.

Friday 20 May 2016

Unified Service Desk 2.0.1 - Customization File Issue

Unified Service Desk Customization File-


  • As we all know Microsoft has introduced Customization File feature in latest release (2.0.1) of Unified Service Desk by which Developers can extend the core functionality offered by Unified Service Desk by creating custom hosted controls and functionality as per their business requirement. However, until now, deploying custom components involved copying the files required for the custom functionality on each client computer either manually or through some other automated way, such as a custom MSI package installer.

  • Unified Service Desk now provides out-of-box support for easily deploying and updating custom components. Use the new Customization Files entity to upload your custom files to the CRM server as a compressed (.zip) file. The .zip file contains files required for the custom functionality along with a [Content_Types].xml file that provides MIME type information of the file type extensions that are included in the .zip file. The Customization Files record can then be attached to a Configuration record in Unified Service Desk so that when any user who is part of the configuration record uses Unified Service Desk client to connect to CRM, the .zip file attached to the Customization Files record is automatically downloaded and contents are unpacked on the client user’s computers to render the custom functionality in their client application. This eliminates the need for administrators to have to manually copy the custom files to the client computers.

  • When there is an update to the custom components, developers provide the latest .zip file with the updated custom component files to the administrator. The administrator replaces the .zip file in the Customization Files entity record on the CRM server, and updates the client caching number to push the update to all the clients. More information: TechNet: Push an update to clients


Issue in Unified Service Desk Customization File-

  • I have configured a External Hosted Application type Hosted Control to use a dll and exe for some kind of automation. It works by just copying the DLL and EXE into the USD installation directory. But if i use Configuration File feature of USD 2.0.1 (as given in link https://blogs.msdn.microsoft.com/usd/2015/11/19/customization-files-in-unified-service-desk/), it supposed to work too with copying the file at C:\Users\<Username>\AppData\Local\Microsoft\UnifiedServiceDesk\<MyOrgName> location. but its not working anymore. Also found below error in Error File: System.IO.FileNotFoundException: Could not load file or assembly 'mydll' or one of its dependencies. The system cannot find the file specified.

  • Its mentioned on MSDN forum that, it is not necessary to copy the Package Deployer Temp files to USD Client installation directory to make it work smoothly, but while i am launching USD client 2.0.1 its giving me so many error of Cannot load KPI control, Email generator, notes manager etc, which i guess due to not to copying of Package Deployer Temp files in USD Client installation directory. Please let me know is that mandatory to copy the Temp file in USD 2.0.1 Client installation directory to make it work properly.

I posted the same issue at Microsoft Forum and below is the response i got of the same:


Also 


Hope, Microsoft will fix this issue soon in their next release.



ADXStudio Lookup Filtering - Filter DropDownList in ADXStudio

As we all know that ADXStudio has one of the intresting Out Of Box feature to Convert CRM Lookup into DropDownList on ADXPortal Entity Form, but the major limitation of this feature is, it stop filtering data if you have applied Lookup Filtering on CRM Lookups in CRM.

So if I want to Filter my two lookup fields on ADXStudio Portal Entity Form, It doesn't work if we will convert them into DropDownList using Entity Form Metadata. i tried to figure out so many alternatives ,Also asked on ADXStudio Community Forum, And I found its the Limitation of converting Lookup into DropDownList in ADXStudio. Hope will get the solution in next ADX release

So only solution that i came into my mind is to use DropDownList Filtering using JQuery in Entity Form to achieve the same.

Here what i was doing...

I had two Lookups on my CRM Case Entity Form (State and City) and I converted them into DropDownList using Entity Form Metadata.  And below is the code through which i filtered my City DropDownList based on State DropDownList:

We can write this JQuery in "Custom JavaScript" section of AdxStudio Entity Form in CRM.

<script type="text/javascript">
    $(function ()
    {
        
        var $state = $('#state');
        var $city = $('#city');

        var $cityList = $city.find('option').clone();

        var stateandcity =
        {
            MP: ["Gwalior", "Indore", "Bhopal", "Other"],
            UP: ["Noida", "Agra", "Lukhnow", "Other"],
            Mahrashtra: ["Nagpur", "Pune", "Mumbai", "Other"]
        }

        $state.change(function ()
        {
            var $selectedState = $(this).find('option:selected').text();
            $city.html($cityList.filter(function () {
                return $.inArray($(this).text(), stateandcity[$selectedState]) >= 0;
            }));
        });
    });
</script>

Here is the Output of the above Code:



Thursday 18 February 2016

Customer Service Dashboard in CRM 2015 using HTML5, JavaScript, JQuery, CSS, DOM & OData

Introduction:

I’m feeling really happy while writing this blog, because i have been too busy from last couple of months to write even a single blog. From now on, I’m hoping to keep this activity continued.

As u all know Microsoft Dynamics CRM dashboards are one of the best way to show collective information about CRM in single shot and its also the collections of view lists, charts and iFrames that can pull in things like website information that you can modify to show key performance indicators and other important data. Here’s an example of what a dashboard looks like:







Today i am going to show a Customer Service Dashboard using HTML5, JavaScript, JQuery, CSS, DOM and OData. Intention is only to learn how can we use HTML5, JavaScript, JQuery, CSS, DOM and OData in Dynamic CRM. 

Language Used:

HTML5, JavaScript, JQuery, CSS, ODATA

This blog is also helpful for all those CRM Folks who are interesting to know how HTML5, JS, DOM and Odata can provide intuitive UI to dynamic CRM either in Dashboard or in entity forms.

I have designed a Customer Service Dashboard that shows CRM Case Log in very intuitive way, Below are the few screenshots of the same with some of its exiting features for beginners:

Few of the exciting features of this dashboard are described below in brief:


  • Dashboard will show Case Count based on its Source (Web, Email, Phone, Chat).
  • Agent can directly create new case from dashboard itself,
  • Agent would have Refresh option so that he can able to see changes made by other agents instantly,
  • Agents can directly Delete cases from Dashboard itself.
  • Agents can directly open the case by clicking on Case Title.
  • Agents can also check Ticket No or Case ID by doing hover on Case Title.

Features Used:

Feature 1 : Show Loading Message and Image unless OData Query retrieve the result from CRM.

:

Feature 2 : Call Center Agent Can directly Create new case in CRM by clicking on "+" icon.




Feature 3 : Call Center Agent will be able to see all cases of CRM status wise based on its Source like WEB, EMAIL, PHONE and CHAT.
Also agent would have Paging option so that he can be able to see only 5 case in single page, he has to navigate to next page to check other case status




Feature 4 : Call Center Agent will be able to see Ticket number on Hover of Case Title.



Feature 5 : Call Center Agent can directly delete the Case after clicking on OK in Cinformation dialog,























And after clicking on Refresh button he can check the required changes



Feature 6 : Call Center Agent will be able to see all the cases Source wise simultaneously.


Feature 7 : Call Center Agent can directly open the case by clicking on Case Title.





















I will surely come back with other such new exciting task in CRM...Keep reading...

Also feel free to put your valuable comments to share your feedback and get to know more about this task.

OR

Email Me: arpit.crmconsultant@gmail.com

Thursday 28 January 2016

Show Record URL in Email in CRM 2015

For a long time now, Dynamics CRM users have been requesting the ability to add a hyperlink to a Workflow, so that when you receive a reminder or notification email, you can quickly click the Record URL to open the CRM record. There have been a few different solutions available on the CRM Marketplace to achieve this, however Dynamics CRM 2015 has the ability to link to records is now automatically available from workflows.

In one of my project i had a requirement to attach Current Record URL with Email. i have explained my requirement in brief below:

On Case Creation we have to Send Email with URL of Created Case Record. So that customer can directly open case using that URL and can have a look for detail information. For this we can create a Workflow on Case Creation and send Email using that Workflow, Please Follow Below Steps.

Step 1 .  Create a Workflow on Case Creation and Click on Add Step and select Send Email



Step 2. Now Click on Set Properties.


Step 3. Now Click on Insert Hyperlink.


Step 4. Now Enter Text in Text to display field and in URL field select Record URL(dynamic) from case and Click on OK.





Step 5. Now you can Add Sender and recipient to your Email then click on Save and close this email.
            and Save and Publish the Workflow.






By Following Above Steps Created Record of case we can see By clicking on Click here to see the Record in Email.

Blogger Widgets