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.

Wednesday, March 30, 2016

Two Default Views for an entity in MS CRM 2011

HI All,

Please find the below Solution to fix the two default view for an entity.

1. Create a solution by taking your Entity only.
2. Export the solution and unzip it
3. open the Customization.xml file in VS studio
4. then search for the View in saved queries node tag
5. change <isdefault> value from 1 to 0.
6. then zip the solution and import it, publish it and check. there will be one default public view

Monday, March 28, 2016

Validate date MSCRM Javascript

function ValidateDates() {
    var Date1 = Xrm.Page.getAttribute("scheduledstart").getValue();
    var Date2 = Xrm.Page.getAttribute("scheduledend").getValue();
    if (Date1 != null && Date2 != null) {
        if (Date1.setHours(0, 0, 0, 0) < Date2.setHours(0, 0, 0, 0)) {
            alert("You must specify an end time that happens after the start time");
        }
    }
}

How to Run Microsoft Flow for Every one Month

Introduction: In this Blog we will see how to Run Microsoft Flow for Every one Month. Implementation Steps:   1. Navigate to  https://make.p...