Monthly Archives: June 2011

Set Default Price list in MS CRM 2011 using Java Script

if you want to set default price list with help of java script, you can use Rest, below is the code to fetch pricelist id based on pricelist name and set it
function SetPriceList() {

var number = 1;
var filter = “/PriceLevelSet?$select=Name,PriceLevelId&$filter=Name eq ‘Default'”;
function GetODataPath() {

return Xrm.Page.context.getServerUrl() + “/xrmservices/2011/organizationdata.svc”;
function RetrieveUnit(filter) {

var retrieveRecordsReq = new XMLHttpRequest();“GET”, GetODataPath() + filter, false);
retrieveRecordsReq.setRequestHeader(“Accept”, “application/json”);
retrieveRecordsReq.setRequestHeader(“Content-Type”, “application/json; charset=utf-8”);
var temp= retrieveRecordsReq.send();
if (retrieveRecordsReq.readyState == 4 && retrieveRecordsReq.status == 200) {
var retrievedRecords = this.parent.JSON.parse(retrieveRecordsReq.responseText).d;
var Result = retrievedRecords.results[0];
var lookup = new Object();
var lookupValue = new Array(); = Result.PriceLevelId;
lookup.entityType = “pricelevel”; = Result.Name;
lookupValue[0] = lookup;
*I have created a Default pricelist.

Enjoy !!


Filed under MS CRM 2011

MS CRM 2011 Developer Training Kit released

MS CRM 2011 training kit is released. you can download it from below URL

Happy Learning….!!!

Leave a comment

Filed under MS CRM 2011

“Unable to access the MSCRM_CONFIG database. SQL Server does not exist or access denied” Error

If you are getting below error while trying to access MS CRM 2011 deployment manager

check if “SQL Server Agent” service is running or not, if not just start this services and then try


1 Comment

Filed under MS CRM 2011

Getting Parent Entity Information from child

In MS CRM 4.0 we used to get parent entity information using window.opener which is not there in CRM 2011 now. In CRM 2011 you can use below code

so using this statement you can get parent entity information and can fetch parent entity data, but sometime we also need to check parent entity name, let’s take an example of order, we can create order from opportunity form, we can create it from account form as well. So in that case if we need to check which is the parent entity in order form we can use below statement to check entity name


enjoy !!



Filed under MS CRM 2011

MS CRM 2011 Virtual Machine

If you are a Microsoft partner you can download MS CRM 2011 Virtual Machine from{060C9677-229D-49E1-9F00-95E56D9F1657}&NRORIGINALURL=/partnersource/deployment/methodology/vpc/MSD_CRM2011VirtualMachine&NRCACHEHINT=Guest&w&wa=wsignin1.0

Enjoy !!


Filed under MS CRM 2011

‘Sys’ is undefined error while using Ajax 4.0 and Visual studio 2010

We used Ajax in one of our ISV application and when we deployed it in Production server, we started facing this issue, after doing a search in google, I found I need to do changes in my webconfig file to make ajax enabled, as we used vs 2010, so these entries were not there in our webconfig file. So we created one sample website in VS 2008 and all required configuration was there in webconfig. Then we copied these required configuration in our ISV application and deployed to production server, then we started getting another error

“There is a duplicate ‘system.web.extensions/scripting/scriptResourceHandler’ section defined”

After commenting this section it worked perfectly.


Leave a comment

Filed under Ajax