Category Archives: MS CRM 4.0

Tooltip In CRM 4.0

As in my previous http://mahenderpal.wordpress.com/2009/12/10/tooltip-for-ms-crm-fields/ Post I have discussed how to set Tooltip for CRM Fields, I want to extend this post. Tooltip For Left Navigation Items sometimes we need to set custom tooltip for left navigation items, so we can use the same title attribute to set but for left navigation link you have to set title for child element… Read more »

Make left navigation link as default link in a record

I found a question here to set left navigation link as default for ms crm record, while opening ms crm form. http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/9dd557d3-3828-441b-a6dc-e6c481fdb8c9 We can easily do this through JS, we just need to get ID of particular left navigation item which we can get IE Dev toolbar or Developer Tools Paste this code on form onload event var NavItem=document.getElementById(“Paste LeftNavigation… Read more »

Rearrange Navigation Items in Left Navigation Bar

Some time we need to rearrange left navigation item of left navigation bar, we can do this easily using JS “insertBefore()” function. Just we need to get element id of the left navigation items. We can use IE dev toolbar to do this; also if you are using IE 8 then IE dev toolbar will not work, as Microsoft has… Read more »

Calculate Number of Days between two Dates in MS CRM

Some time we need to calculate number of days between two dates in crm, we can easily do this using below JS script var d1=crmForm.all.FirstDate.DataValue; var d2=crmForm.all.SecondDate.DataValue; var DayValue=1000*60*60*24; alert(Math.ceil((d2.getTime()-d1.getTime())/DayValue)); Update for Dynamics 365 var d1=Xrm.Page.getAttribute(“FirstDate”).getValue(); var d2=Xrm.Page.getAttribute(“SecondDate”).getValue(); var DayValue=1000*60*60*24; alert(Math.ceil((d2.getTime()-d1.getTime())/DayValue));

Set CRM DateTime

Mahender   April 15, 2010   No Comments on Set CRM DateTime

Some time we need to set crmdatetime based on input value for year,month,date so we can create datatime variable in .net as DateTime _DateTime=new DateTime(2010,4,15);   so it will result like “4/15/2010 00:00:00” But if you will try to assign this value to crmdatetime like CrmDateTime _CrmDateTime = new CrmDateTime(); _CrmDateTime.Value=_DateTime.ToString(); you will get a date-time format exception in crm As CrmDateTime class… Read more »

Navigation Control through Sitemap

Today I got requirement from one of my client for dynamics crm online, that they just want to show only Workplace and Setting navigation to all users except System Admin. The first thing that came in my mind to set Privilege attribute for all Subarea in all navigation with “All” for example for account to use like as below <Privilege… Read more »

Update Entity Record Using Dynamic Entity

I want to share somecode to update entity using dynamic entity with all //Create ICrmService object ICrmService  _iCrmserviceObject=context.CreateCrmService(true); //Create Dynamic entity object  DynamicEntity _DynamicEntity = new DynamicEntity(); //Assign name of entity which you want to update let’s say account             _DynamicEntity.Name = “account”; //We have to add properties to dyanic entity that we want to update //we can add directly… Read more »

Custom Workflow To get Datetime for the specified day of the week

One of my client ask me to develop a custom workflow for Following Date Manipulation functions Get the day of the week from a datetime field Get the date only part of a date time field to a workflow variable Get the time only part of a date time field to a workflow variable Get the datetime value for the… Read more »

Custom WorkFlow Activity DateTimeInput Issue

I got requirement to get Date for next weekday based on the weekday index input For example if you need to check what the date on next Monday is, As obvious I created two workflow input variables and wrote logic to get next weekday date. But I found the custom workflow not working because of the because of the datetime… Read more »