الخميس، 20 أغسطس 2015

CRM Update Rollup 16:Action Microsoft.Crm.Setup.Common.Update.DBRemoveAction failed

When i try to uninstall the update rollup 16 i get the following error:

Action Microsoft.Crm.Setup.Common.Update.DBRemoveAction failed.

Exception has been thrown by the target of an invocation.

organization With Id = xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx Does Not Exist

Solution:
write the following query in SQL server for MSCRM_Config database:

Select FreindlyName from Organization
where Id='xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx'

then from the deployment manager disable and delete this organization.

الأحد، 26 يوليو 2015

Dynamics CRM 2013 :Read Sub-Grid Cell value

Here is sample code to get sub grid cell value in MS CRM 2013.

function GetSubGridCellValues() {
    if (document.getElementById("SubGridName")) {
        var grid = document.getElementById("SubGridName").control;
        var ids = gridControl.get_allRecordIds();
        for (i = 0; i < ids.length; i++) {
            alert(gridControl.getCellValue('fieldName', ids[i]));
        }
    }
    else {
        setTimeout("GetSubGridCellValues();", 1000);
    }
}

الخميس، 23 يوليو 2015

Disable Subgrid Control in CRM 2013

function DisableSubgrid(SubgridName) {
    var grid = document.getElementById(SubgridName);
    if (!grid) {
        setTimeout("DisableSubgrid('" + SubgridName + "');", 1000);
        return;
    }
    else {
        grid.control.add_onRefresh(function () {
            var gridCtrl = document.getElementById(SubgridName);
            document.getElementById('titleContainer_' + SubgridName).style.display = 'none';
            var nodes = gridCtrl.getElementsByTagName("tr");
            for (var i = 0; i < nodes.length; i++) {
                if (nodes[i].className == "ms-crm-List-Row-Lite") {
                    nodes[i].className = "";
                    nodes[i].removeAttribute("onmouseover");
                    nodes[i].removeAttribute("onclick");
                    nodes[i].removeAttribute("onmouseout");
                    nodes[i].onclick = function (evt) {
                        evt.stopPropagation();
                        evt.preventDefault();
                    }
                    nodes[i].ondblclick = function (evt) {
                        evt.stopPropagation();
                        evt.preventDefault();
                    }
                }
            }
        });

        document.getElementById('titleContainer_' + SubgridName).style.display = 'none';
        var nodes = grid.getElementsByTagName("tr");
        for (var i = 0; i < nodes.length; i++) {
            if (nodes[i].className == "ms-crm-List-Row-Lite") {
                nodes[i].className = "";
                nodes[i].removeAttribute("onmouseover");
                nodes[i].removeAttribute("onclick");
                nodes[i].removeAttribute("onmouseout");
                nodes[i].onclick = function (evt) {
                    evt.stopPropagation();
                    evt.preventDefault();
                }
                nodes[i].ondblclick = function (evt) {
                    evt.stopPropagation();
                    evt.preventDefault();
                }
            }
        }
    }
}

الخميس، 25 يونيو 2015

CRM 2013 Error:Unable to Change Domain Logon Name

When I am trying to add the new user on CRM 2013, i am getting the following error:
"Unable to Change Domain Logon Name"

To solve this issue do the following: 
1- In your CRM server, go to services.msc and check if the "Workstation" service is set to automatic and started 
2- Make sure you have the "AutoGroupManagement" value set to 1 (false) in your registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM)

الخميس، 21 مايو 2015

Changing a Websites Name in IIS 7

Run the windows command prompt but ensure you “Run as Administrator” and use the following commands:

cd C:\Windows\SysWOW64\inetsrv

appcmd set site "Old Sit Name" -name:"New Site Name"