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.

Tuesday, 31 March 2015

Call External Web Service using Custom Action in CRM 2013/15


In this article, I am providing an example of how actions can be used to make a request to a web service outside of the CRM domain from a record’s form event.

Scenario

Agents need to capture the temperature of City on Case form based on City selected on City Field. In order to do so, we decide to create a button on the command bar that agents can click on and that will perform the following tasks:


  • Read the City and Country information from the form
  • Call an Action that - 
  • Takes the City and Country as parameters
  • Use an external web service to get the temperature in the city
  • Returns the temperature as output parameters
  • Sets the temperature field value on the form
Note: In order to achieve this directly with JavaScript, performing Step 2 of the action would require to make a cross-domain call from JavaScript.

Process Configuration

To start things off, let’s start be creating an Action of type process. This action will have 2 input values (City and Country) and 2 output values (Temperature in Fahrenheit and in Celsius).


The steps are really simple. The action needs to a custom workflow activity that will connect to a weather web service and return the temperature in two output values of its own.













Custom Workflow Activity

Here you can see what the custom workflow activity code looks like. It’s very straight forward in that it only has 3 steps:


  1. Read the city and country inputs
  2. Initialize the web service client object and make the web service call
  3. Set the values back in the output fields to be available in the process















Calling Action from JavaScript



This is the last piece of the puzzle. At this point, we simply need to call the action created from a JavaScript event (ribbon button clicked, on change of a value etc.). In order to achieve this, create a function that is called when the client even occurs. That function should execute the Action, read the output values and set the field values on the form. This has to be done with a SOAP call. There are two ways to do this. 

You can:

Use below link to call Custom Action using Javscript-


Hope this help.

Monday, 30 March 2015

How to Enable/Disable users in Dynamic CRM Online

Enabling and Disabling of users in Dynamic CRM On-Premise is not a very tough tasks. Anyone have admin rights can easily select the users from User grid view and Disable it by clicking on Activate/Deactivate button to Enable/Disable the users.

But In Dynamics CRM Online, you won't find Enable / Disable button for System User Records because the Users are monitored through Office365 Portal.

If you have added Users through Office365, then you need to Assign / Remove the CRM License in order to make them Enable or Disable in Dynamics CRM.

So here is the step by step process to Enable/Disable Dynamic CRM Online Users :

Step 1 -

Here you can see I have 4 users in CRM 2015 online organisation and I want to disable one user named 'Suresh Raina'.

Step 2 -

 Login to Office 365 Admin Portal using below Link :
https://portal.office.com/admin/default.aspx#
 Enter CRM online Admin Credential and Login into account


Few of yours might get below error while accessing Office 365 Admin Portal -


This error usually come when you don't use correct URL to access the Office 365 Portal, In some of article/blog you will found the incorrect url to access Office 365


Step 3 - 

After Logged in into Office 365 Portal , you will see Users > Active Users in Left Navigation pan as below





Step 4-

Click on Active Users to see all Enable/Disable users of your CRM Online Org





Step 5 -

Select any one users(Suresh Raina) you want to disable by clicking on Checkbox as shown below



Step 6 -

On the selection of users you would see a new navigation in right side of window
Click on 'Edit'

Step 7 - Uncheck the checkbox 'Microsoft Dynamic CRM Online Professional' to remove the license of user or to disable the user as shown below



Step 8 -

After Clicking on Save Button user will no longer Enable for CRM.
Login to CRM online organisation to check user Status 


As you can see user(Suresh Raina) has been reached to Disable Users View

Friday, 27 March 2015

How to change display text of a lookup field in Dynamics CRM 2011/13/15 using JavaScript


Usually when we select a value in a lookup field it displays the Primary Name Field in the text after selection. However it holds the PrimaryIDField in the background.

While working on a requirement a need arise to display a field in the LookUp display which is not a PrimaryNameField.

Let's consider the Order Lookup field here on Case Form. 

Requirement :


Display OrderNo in the display field instead of the OrderName (Which is a PrimaryNameField) in every Order Lookup.
(I have implemented this requirement in CRM 2015)


Before Using Javascript Lookup field Display text will look like below :



Javascript :

Pass Lookup Field as Parameter (I had passed "new_orderno" as fieldname parameter)
Put this Javascript on 'onchange' event of lookup field-

//Change Lookup Display Text

function ChangeLookUpDisplayValue(fieldname)
{
var lookupData = new Array();
var lookupItem= new Object(); 
var lookup = Xrm.Page.data.entity.attributes.get(fieldname);

if(lookup!=null)
{
var displayvalue='';
var xmlText='';

xmlText+="<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">";xmlText+="<s:Body>";
xmlText+="<Retrieve xmlns=\"http://schemas.microsoft.com/xrm/2011/Contracts/Services\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">";
xmlText+="<entityName>salesorder</entityName>";
xmlText+="<id>"+lookup.getValue()[0].id+"</id>";
xmlText+="<columnSet xmlns:a=\"http://schemas.microsoft.com/xrm/2011/Contracts\">";
xmlText+="<a:AllColumns>false</a:AllColumns>";
xmlText+="<a:Columns xmlns:b=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\">";
xmlText+="<b:string>ordernumber</b:string>";
xmlText+="</a:Columns>";
xmlText+="</columnSet>";
xmlText+="</Retrieve>";
xmlText+="</s:Body>";
xmlText+="</s:Envelope>";
var xHReq = new XMLHttpRequest();


var url=Xrm.Page.context.getClientUrl()+"/XRMServices/2011/Organization.svc/web";
xHReq.open("POST",url,false);
xHReq.setRequestHeader("SOAPAction","http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Retrieve");
xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xHReq.setRequestHeader("Accept","application/xml,text/xml,*/*");
xHReq.send(xmlText);

//Capture the result. 
var resultXml = xHReq.responseXML; 
var varray = new Array();

//Check for errors. 
var errorCount = resultXml.selectNodes('//s:Fault').length;
if(errorCount != 0) 
{
var msg = resultXml.selectSingleNode('//faultstring').nodeTypedValue;
alert(msg); 
}
else
{ 
var result = resultXml.getElementsByTagName("a:KeyValuePairOfstringanyType");
if(result.length>0) 
{
displayvalue= result[0].childNodes[1].lastChild.text;
}
if(displayvalue!='')       
{ 
lookupItem.name = displayvalue;
lookupData[0] = lookupItem;
lookup.DataValue = lookupData;
Xrm.Page.getAttribute("new_orderno").setValue([{id:lookup.getValue()[0].id,name:displayvalue,entityType:"salesorder"}]);
}
}
}
}

After Putting Above Javascript Lookup display text will look like below :





Blogger Widgets