Wednesday, April 27, 2016

Dependencies of Managed Solution MSCRM

Hi,

Please find the below link to find out the dependencies of CRM Managed Solutions

http://{Your Server Name}/{Your Organization name}/tools/dependency/dependencyviewdialog.aspx?objectid={Solution Guid }&objecttype=7100&operationtype=dependenciesforuninstall#

Tuesday, April 12, 2016

Get all User's from Team MSCRM CRM 2013

Hi All,

Please find the below Fetch XML code to fetch all the users from team

function onload()
{
var getUserJS = Xrm.Page.context.getUserId();
getUserJS = getUserJS.replace(/[{}]/g, "");
getUserJS = getUserJS.toLowerCase();
var getusesfromTeam = getUsers(pass Team Id);
if (getusesfromTeam.length > 0) {
for (var getOwningUsers = 0; getOwningUsers < getusesfromTeam.length; getOwningUsers++) {
if (getOwningTeamusers[getOwningUsers].attributes.systemuserid.value == getUserJS) {
return true
         }
     }
   }
}

function getUsers(teamid) {
    var GetUsers = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>" +
  "<entity name='systemuser'>" +
    "<attribute name='fullname' />" +
    "<attribute name='businessunitid' />" +
    "<attribute name='title' />" +
    "<attribute name='mobilephone' />" +
    "<attribute name='systemuserid' />" +
    "<attribute name='positionid' />" +
    "<order attribute='fullname' descending='false' />" +
    "<link-entity name='teammembership' from='systemuserid' to='systemuserid' visible='false' intersect='true'>" +
      "<link-entity name='team' from='teamid' to='teamid' alias='ac'>" +
        "<filter type='and'>" +
          "<condition attribute='teamid' operator='eq' value='" + teamid + "' />" +
        "</filter>" +
      "</link-entity>" +
    "</link-entity>" +
  "</entity>" +
"</fetch>";

    var OwningUsers = XrmServiceToolkit.Soap.Fetch(GetUsers);
    return OwningUsers;
}

Monday, April 11, 2016

RoleService:VerifyCallerPrivileges failed. PrivilegeName: prvMerge error in CRM 2015

Hi All,

I was getting the below error when I was trying to import a team. while importing am getting am error like  "RoleService::VerifyCallerPrivileges failed. User: , PrivilegeName: prvMerge, PrivilegeId: , Depth: Global, BusinessUnitId: "

Fix:

Provide access to the "Merge" entity to the security role whom the current user belongs to


Friday, April 8, 2016

How to restore Button's in MSCRM

Hi All,

Please find the below steps to restore all the Entity Ribbon in Custom or OOB entity


    1. Create a solution that just includes the entity with the button that isn’t working correctly and export from CRM.
    2.Extract the customization zip file.
    3.Open the customization.xml file in the editor of your choice.
    4.Search for RibbonDiff.
    5.Replace the entire <RibbonDiff> section with the following:

<RibbonDiffXml>
  <CustomActions />
  <Templates>
    <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
  </Templates>
  <CommandDefinitions />
  <RuleDefinitions>
    <TabDisplayRules />
    <DisplayRules />
    <EnableRules />
  </RuleDefinitions>
  <LocLabels />
</RibbonDiffXml>

      6.Then Save it.
      7.Compress the Folder and import it to the Organization.
      8.Publish all Customization.

Friday, April 1, 2016

Hide Subgrid + Button For Attachment in Email Entity Etc

Hi all,

I have got a requirement to hide + new button for Attachment in Sub-Grid. Please find the code to achieve the same

Javascript:

        setTimeout(function () {
            if (Xrm.Page != null && Xrm.Page != undefined && Xrm.Page.getControl("attachmentsGrid") != null && Xrm.Page.getControl("attachmentsGrid") != undefined) {
                document.getElementById("attachmentsGrid_contextualButtonsContainer").style.display = "none";
            }
        }, 500);

We can use the above code to hide all the Subgrid + Button. You need to replace "attachmentsGrid" as your Subgrid name to achieve the same.

Day 11 - Customizing Option Sets Dropdown Fields with JavaScript

  In this Blog, we will see how to Customizing Option Sets Dropdown Fields with JavaScript label1 = formContext.getAttribute( "bosch_op...