Hide tabs in Social Pane using jquery in Ms crm

Hello Crm People,

The following code snippet helps you to hide all other tabs except “Activities” tab in the Social Pane. This is done with Jquery.


Code Snippet:  

function SocialPaneTabs() {
parent.$(document).ready(function () {
parent.$(‘#header_notescontrol’).find(‘a’).each(function () {
if (“ACTIVITIES” == parent.$(this).attr(‘title’))
else parent.$(this).hide();


Use this on form onload.

Thank you.

Hope it helps someone.




How to show/hide ribbon button of a queue based on the view selected in queue

Hello Crm People,

The below is the code snippet to be called on the particular ribbon button’s enable rule in order to show or hide it based on the queue’s view.queue view

Code Snippet:(Enable rule on my custom button: If Option is ‘All Queues’ then Button is displayed,else it is hidden.)

function queue() {
var view= $(“#crmQueueSelector”).find(“option:selected”).text(); //use parent.$ for version less than dyn 365 9.0
if (view == “All Queues”) {
return true;
else return false;

So, When value is “All Queues” the custom button is visiblevisible

And when Option is other than “All queues”, the custom button is hidden.

not visible


Hope it helps.







JavaScript for Multi Optionset in Dyamics 365 9.0 (July Update)

Hi Crm People,

Multi Option set is the latest feature added with Dynamics 365 9.0 release. So thought of exploring this and share my work with all of you.

1.To Retrieve Multi Optionset Values:

var picklist = Xrm.Page.getAttribute(“new_multipicklist”).getValue();


//result : 100000001,100000002

2. To Retrieve Multi Optionset Text Values:

var picklist = Xrm.Page.getAttribute(“new_multipicklist”).getText();

//result : India, Australia

3. To Set Multi Optionset values:

var picklist = [100000000];  (or)  var picklist = [100000002,100000001];

Hope it helps!!




Dynamics 365 Sample Web Application

Hello CRM People,

Since there was a change in the web application connection procedure from 2015 to 2016,dyn 365 because of intoduction of MS CRM Tooling Connector and the depriciation of Microsoft.XRM.Client dll, I thought of writing some sample and also simple web application, which might help someone needy.

Step1: Create a web Application project in VS.

Step2: Add a web form to the project you have created.

Step3: Code snippet in the aspx.cs file

using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Tooling.Connector;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Dynamics365SampleWebApplication
public partial class SampleService : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
String connectionString = “Url=https://org.crm8.dynamics.com; Username=name@org.onmicrosoft.com; Password=pwd; authtype=Office365”;
CrmServiceClient conn = new Microsoft.Xrm.Tooling.Connector.CrmServiceClient(connectionString);
var _orgService = (IOrganizationService)conn.OrganizationWebProxyClient != null ? (IOrganizationService)conn.OrganizationWebProxyClient : (IOrganizationService)conn.OrganizationServiceProxy;
Guid userid = ((WhoAmIResponse)_orgService.Execute(new WhoAmIRequest())).UserId;


Step5: Note Plese refer to the following assemblies, Use dyn 365 sdk

Dlls Required?





How to retrieve the Access team members of a particular record using Fetch Xml

Hello CRM People,

Below is the fetch Xml code snippet to retrieve the Access team members associated to a specific record.


var qryToRetrieveExistingMembers = @”<fetch mapping=’logical’ version=’1.0′>
<entity name=’systemuser’>
<link-entity name=’teammembership’ from=’systemuserid’ to=’systemuserid’ alias=’tm’ link-type=’inner’>
<link-entity name=’team’ from=’teamid’ to=’teamid’ alias=’t’ link-type=’inner’>
<link-entity name=’principalobjectaccess’ from=’principalid’ to=’teamid’ alias=’poa’ link-type=’inner’>
<link-entity name=’EntityShemaName’ from=’EntityIDSchema ‘ to=’objectid’ alias=’s’ link-type=’inner’>
<filter type=’and’>
<condition attribute=’EntityIDSchema(LookupIdSchema)’ operator=’eq’ uitype=’EntityShemaName’ value='” + Guidofspecificentity(32-Bit) + “‘ />” + @”
<link-entity name=’teamtemplate’ from=’teamtemplateid’ to=’teamtemplateid’ alias=’tt’ link-type=’inner’>
<attribute name=’teamtemplatename’ />
EntityCollection ecExistingTeamMembers = service.RetrieveMultiple(new FetchExpression(qryToRetrieveExistingMembers));

Thank you, Hope it helps someone.


Get the Parent record(Window) guid

Hello CRM People,

The following code snippet will help you to get the parent record guid.

This will help you for Bulk edit and quick create forms as well to retrieve the parent window guid and attributes


Example : Get the Parent window guid in Bulk edit form

function bulkedit(){
if (Xrm.Page.ui.getFormType() == 6) {
var ParentId = window.parent.frames[0].Xrm.Page.data.entity.getId();
alert(ParentId );



Hope it helps someone.




Crm Instance was not found

Microsoft flow



Hello Crm People,

When I tried to create a microsoft flow between my dynamics 365 accout and yammer, I got this error at the dynamics 365 level.

The issue is occuring when we try to give the crm organisation name.

Resolution: Instead of manually entering the organisation name select the down arrow at the end of the text box below the *Organisation name filed. Wait for some time to load the options and pick one option.

Note: In internet explorer the “Down arrow” will be really really small.

In Chrome


Thanks. Hope it helps..