Monthly Archives: July 2015

Save, Resolve the Case and Refresh the Form


//Save the Form Xrm.Page.data.entity.save(); //Build Request – Here the Status would be “Resolved” and Status Reason is 5 i.e. Problem Solved Pass Entity ID var request = “<s:Envelope xmlns:s=’http://schemas.xmlsoap.org/soap/envelope/’>&#8221; + ” <s:Body>” + ” <Execute xmlns=’http://schemas.microsoft.com/xrm/2011/Contracts/Services&#8217; xmlns:i=’http://www.w3.org/2001/XMLSchema-instance’>&#8221; + ” <request … Continue reading

Posted in CRM, Java Script, Ms Dynamics CRM 2013, MS Dynamics CRM 2015 | 1 Comment

Changing Dashboard Default Setting


1. Open a Powershell window on your CRM server – ‘Start > Run > “PowerShell” > OK‘. 2. Add the Microsoft Dynamics CRM PowerShell snap-in – ‘Add-PSSnapin Microsoft.Crm.PowerShell‘. 3. Enter the following command to retrieve the current setting – ‘$setting … Continue reading

Posted in Ms Dynamics CRM 2013, MS Dynamics CRM 2015 | Leave a comment

Formatting the Date in Javascript


Date.prototype.toFormattedString = function (format) { var date = this; var formatted = “”; formatted = formatted + format.replace(/dd|mm|yyyy|MM|hh|ss|ms|AMPM|\s|\/|\-|,|\./ig, function match() { switch (arguments[0]) { case “dd”: var dd = date.getDate(); return (dd < 10) ? "0" + dd : dd; … Continue reading

Posted in Ms Dynamics CRM 2013 | Leave a comment

Get Logged In User Full Name


function getLoggedInUserFullName() { var ODataPath = Xrm.Page.context.getClientUrl() + “/XRMServices/2011/OrganizationData.svc”; var xmlHttpRequest = new XMLHttpRequest(); xmlHttpRequest.open(“GET”, ODataPath + “/SystemUserSet(guid'” + Xrm.Page.context.getUserId() + “‘)”, false); xmlHttpRequest.setRequestHeader(“Accept”, “application/json”); xmlHttpRequest.setRequestHeader(“Content-Type”, “application/json; charset=utf-8”); xmlHttpRequest.send(); if (xmlHttpRequest.status === 200) { var user = JSON.parse(xmlHttpRequest.responseText).d; return user.FullName; … Continue reading

Posted in Ms Dynamics CRM 2013, MS Dynamics CRM 2015 | Leave a comment

Calling Rest Service and getting XML Data


$(function () { $.ajax({ type: “GET”, dataType: “xml”, url: “http://localhost/MyService/EmployeeRESTService.svc/GetEmployeeList/&#8221;, success: function (data) { xmlParser(data); }, error: function (error) { alert(error); } }); }); function xmlParser(data) { $(data).find(‘Employee’).each(function () { var FirstName = $(this).find(‘FirstName’).text(); var LastName = $(this).find(‘LastName’).text(); var Email … Continue reading

Posted in Ms Dynamics CRM 2013, MS Dynamics CRM 2015 | Leave a comment