jump to navigation

Microsoft CRM 2011 Disable Fields From Picklist May 24, 2011

Posted by jarrettexpertcrm in Uncategorized.
Tags: , , , , , , , ,
3 comments


In some cases you need to disable fields based of the value of a picklist. Below is the code to achieve this.

function disableToggle()
{

var value = Xrm.Page.getAttribute(“PICKLISTFIELD”).getValue()
// First Picklist value
if (value == “100000000”)
{
Xrm.Page.ui.controls.get(“FIELD”).setDisabled(false);
Xrm.Page.ui.controls.get(“FIELD”).setDisabled(false);
Xrm.Page.ui.controls.get(“FIELD”).setDisabled(true);

}
// Second picklist value
else if (value == “100000001”)
{
Xrm.Page.ui.controls.get(“FIELD”).setDisabled(true);
Xrm.Page.ui.controls.get(“FIELD”).setDisabled(true);
Xrm.Page.ui.controls.get(“FIELD”).setDisabled(false);

}
// Third picklist value
else if (value == “100000002”)
{
Xrm.Page.ui.controls.get(“FIELD”).setDisabled(true);
Xrm.Page.ui.controls.get(“FIELD”).setDisabled(true);
Xrm.Page.ui.controls.get(“FIELD”).setDisabled(false);

}
// Fourth picklist value
else if (value == “100000003”)
{
Xrm.Page.ui.controls.get(“FIELD”).setDisabled(true);
Xrm.Page.ui.controls.get(“FIELD”).setDisabled(true);
Xrm.Page.ui.controls.get(“FIELD”).setDisabled(false);

}
}

Enjoy!!

– JC

For more information about Dynamics Four you can contact us at http://www.dynamics4.com

Advertisements

Setting a default value on a lookup field in Microsoft Dynamics CRM 2011 May 23, 2011

Posted by jarrettexpertcrm in Microsoft CRM General.
Tags: , , , , , , , , , , , , , , ,
7 comments


In previous a post i posted how to default a value on a lookup field in 4.0. Here is the solution for CRM 2011
function priceList()
{
//Create an array to set as the DataValue for the lookup control.
var lookupData = new Array();
//Create an Object add to the array.
var lookupItem= new Object();
//Set the id, typename, and name properties to the object.
lookupItem.id = ‘{27457CD-3C7C-E011-8E52-1CC1DE7983EB%257d}’;
lookupItem.typename = ‘pricelevel’;
lookupItem.name = ‘test’;
// Add the object to the array.
lookupData[0] = lookupItem;
// Set the value of the lookup field to the value of the array.
Xrm.Page.getAttribute(“pricelevelid”).setValue(lookupData);
}

In my example i am getting the pricelist “test” and defaulting it in the pricelist field on the Opportunity entity. Below is the template you can use to utilize the code for a different look up and values.
function priceList()
{
//Create an array to set as the DataValue for the lookup control.
var lookupData = new Array();
//Create an Object add to the array.
var lookupItem= new Object();
//Set the id, typename, and name properties to the object.
lookupItem.id = ‘{Fields Guid}’;
lookupItem.typename = ‘Entity Name’;
lookupItem.name = Lookup Value;
// Add the object to the array.
lookupData[0] = lookupItem;
// Set the value of the lookup field to the value of the array.
Xrm.Page.getAttribute(“FieldName”).setValue(lookupData);

}

Enjoy!!

For more information about Dynamics Four you can contact us at http://www.dynamics4.com

Microsoft Dynamics CRM 4.0 / 2011 Tech Tuesdays and Webinars January 11, 2011

Posted by jarrettexpertcrm in Microsoft CRM General, Uncategorized.
Tags: , , , , , , , , , , , ,
1 comment so far

CRM 2011 Preview – the Power of Productivity.
Join this free webinar to learn more about the newest release of Microsoft Dynamics CRM.
Sessions are held on the 2nd Thursday of each month.

Tech Tuesdays – Get practical answers and proven solutions from the CRM experts. Dynamics Four offers a free one session designed to explore new concepts, capabilities, and general discussion covering the sales, marketing, and service modules within Dynamics CRM. Sessions are held on the 2nd Tuesday of each month.

http://www.clicktoattend.com/?id=153046 This is link to sign up for Tech Tuesday

http://www.clicktoattend.com/?id=153074 – Link to sign up for CRM2011 preview

Enjoy!

-JC

For more information about Dynamics Four or to contact us please visit http://www.dynamics4.com

Microsoft Dynamics CRM 2011 vs Salesforce October 5, 2010

Posted by jarrettexpertcrm in Microsoft CRM General.
Tags: , , , , , , , ,
7 comments


Not happy with Salesforce.com? On the fence between Microsoft Dynamics CRM 2011 or Salesforce? Let Dynamics Four show you why Microsoft Dynamics CRM 2011 is the right choice. Sign up for the October promotion today!
https://dynamicsfour.leads.dynamicssite.com/SFoffer.aspx

-JC

Microsoft Dynamics CRM 2011 Edit Site Map September 27, 2010

Posted by jarrettexpertcrm in Microsoft CRM General.
Tags: , , , , , , , , , , ,
2 comments

For those that are exploring the new beta CRM 2011 know that a lot has changed. One of the things I wanted to play around with was Site Map editing to see what was different from CRM 4.0. CRM 2011 now has a new feature called “Solutions” which pretty much took over the role of import/export customizations in 4.0. My first efforts were to create a “Solution” and add the Site Map client extension to it. Then, export the Solution, unzip the folder, open Site Map in notepad, make changes, and import back in. Failed. Hmmm ok, let me try and import the original zipped export i did. Success. Ok so basically I could import the original zip file just not one I unzipped. So then i right clicked on zipped folder, selected open with Winzip, modified the sitemap, save and close. Imported successfully. Basically what I see is it needed the orginal export, not a duplicate copy. Im sure there are multiple other ways of doing this so please post to this with other options.

Hope this helps!
– JC

For more information about Dynamics Four or to contact us please visit http://www.dynamics4.com

Microsoft Dynamics CRM 2011 Quick Video Tour #1 September 16, 2010

Posted by jarrettexpertcrm in Microsoft CRM General.
Tags: , , , , , , , , , ,
add a comment


Here is a quick video inside CRM 2011, more videos to come. Please feel free to post comments and if there are certain areas you would like me to go over.

For more information about Dynamics Four or to contact us please visit http://www.dynamics4.com

Microsoft Dynamics CRM 2011 September 14, 2010

Posted by jarrettexpertcrm in Microsoft CRM General.
Tags: , , , , , , , , ,
2 comments

For those that are interested in what CRM 5.0 looks like, here are some screen shots.









As you can see a lot has changed. CRM 2011 has a ton of new features that i will be showing in an upcoming video.

For more information about Dynamics Four or to contact us please visit http://www.dynamics4.com