Category Archives: MS CRM 4.0

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 »

Calling External WebService using JS

 Sometimes we need to call External webservice using JS, i have written a function to call external webservice Here is the function, you can modify it according to your requirements function CallCustomWebService(FunctionName, ParameterNameList, ParameterValueList, ProxyURL) {//FunctionName-Name of the function to call //ParameterNameList-Array of Parameter names in your proxy function //ParameterValueList-Array of Parameter value //ProxyURL-URL of your proxy var CallingFunctionURL = “http://tempuri.org/”… Read more »

Send Parameter From NavBarItem

Sometime we need to send parameter to our custom page from NavBarItem, but as NavBarItem does not support JavaScript property so we can pass parameter to our custom page using openIsvWin function (Unsupported) Code to create NavBarItem <NavBarItem Icon=”/_imgs/ico_18_debug.gif” PassParams=”1″ URL=”http://MyPage.aspx” Id=”MyItem”>       <Titles>          <Title LCID=”1033″ Text=”ISV Default” />      </Titles>  </NavBarItem> Paste this code on formload event navBarItem=document.getElementById(‘MyItem‘); if(navBarItem!=null)… Read more »

Add ISV Button on Entity Grid

Some of you must have faced requirement to add ISV button on Specific entity grid it can be OOB entity or custom entity. We can do this like below:  <Entity> <Grid> <MenuBar> <Buttons> <Button Icon=”/_imgs/ico_18_debug.gif” Url=”http://www.microsoft.com” WinParams=”” WinMode=”2″> <Titles> <Title LCID=”1033″ Text=”Test” /> </Titles> <ToolTips> <ToolTip LCID=”1033″ Text=”Info on Test” /> </ToolTips> </Button> </Buttons> </MenuBar> </Grid> </Entity> Hope it will… Read more »

Tooltip For MS CRM Fields

The easiest way to provide tooltip for crm fields are to use “title” . for example to provide tooltip for accountnumber in account entity just paste following code on formload of account entity crmForm.all.accountnumber.title=”account number used in correspondence about the account”; you can also provide tooltip for lables. Done, But Remember this unsupported