Microsoft released the latest SDK for CRM 2011 ( version 5.0.9 Dated 16.01.2012) . It could be downloaded from the following link.
http://www.microsoft.com/download/en/details.aspx?id=24004
This blog aims to provide some technical tips about Microsoft Azure & Dynamics 365 CRM - D. MANJALY
"тнιѕ вℓσg ¢συℓ∂ ѕανє уσυя мσηєу ιƒ тιмє = мσηєу" - ∂.мαηנαℓу
Tuesday, 17 January 2012
Tuesday, 10 January 2012
eXtremeCRM 2012 Berlin
eXtremeCRM 2012 Berlin
One of our Colleagues ( Mr. Sebastian ) would be a speaker at this great event.
Hats off you Seb ! Wish you good luck !
Lets listen to his words,
"eXtremeCRM in 2012 is going to be held in Berlin and again I have a privilege to be invited as speaker. What I like about that conference, well eXtremeCRM is great event , deep technical readiness on Microsoft Dynamics CRM 2011 a lot of content delivered by Microsoft product team, and technical experts within the channel, not enough new track is coming Practice Leaders Summit. Now a bit about myself, I’ll present definitely more about Azure + XRM working together a lot of new content in comparison to event in Prague and also some new session about SharePoint 2010 + XRM, details will be soon published on eXremeCRM website. There is still a time to register so don’t miss it and see you in Berlin" -- Mr. Sebastian
Further details could be found from his blog
OR From eXtremeCRM website
Tuesday, 3 January 2012
How to override System Ribbon Button in CRM 2011 ( Display / Enable Rule to System Ribbon Button in CRM 2011)
This post would shed light on the following.
How to override System Ribbon Button in CRM 2011 ( Display / Enable Rule to System Ribbon Button in CRM 2011)?
How to show / hide a system button based on a value on the form?
In CRM 2011, it is possible to override the System ribbon button functionality. Also we could apply Enable / Disable Rule Display / Hide Rule to the existing System Ribbon button.
In order to grasp this quickly, lets consider a scenario.
As we all know, there is a Deactivate system ribbon button on the Account form.
Suppose we would like to Enable / Disable this button based on a value on the Account form. To make it simple, lets consider the City field.
For instance, if the city is London, then Deactivate system button should be enabled. Also we should be able to fire our custom javascript when the Deactivate System button gets clicked. This sample could take you through very useful scenarios.
There is a key to unlock the door here. what is that key ? Lets see.
If you refer the SDK, you could find the following folder and file
sdk\resources\exportedribbonxml\accountribbon.xml
Lets find out our System Deactivate button.
Please Note: We don't need to write the following piece of code. This is just an easy way to refer and then to find the key from SDK.
<Button Id="Mscrm.Form.account.Deactivate" ToolTipTitle="$Resources:Ribbon.HomepageGrid.account.Record.Status.Deactivate" ToolTipDescription="$Resources(EntityPluralDisplayName):Ribbon.Tooltip.Deactivate" Command="Mscrm.Form.Deactivate" Sequence="60" Alt="$Resources:Ribbon.HomepageGrid.account.Record.Status.Deactivate" LabelText="$Resources:Ribbon.HomepageGrid.account.Record.Status.Deactivate" Image16by16="/_imgs/ribbon/deactivate16.png" Image32by32="/_imgs/ribbon/Deactivate_32.png" TemplateAlias="o2" />
Now can you guess what's the key in this? Its nothing but the Command.
The only key thing we need to override the System Ribbon button is to know the command value. Rest is as easy as we open a door with a valid key. We need to write the CommandDefinition as shown below.
Please make sure that the code is written under right parent tags.
<CommandDefinition Id="Mscrm.Form.Deactivate">
<EnableRules>
<EnableRule Id="Mscrm.Form.account.Deactivate.EnableRule"></EnableRule>
</EnableRules>
<DisplayRules></DisplayRules>
<Actions>
<JavaScriptFunction Library="$webresource:ap_DeactivateOverride.js" FunctionName="DeactivateOverride" />
</Actions>
</CommandDefinition>
Also the enable rule under rule definitions as show in the above picture.
<EnableRule Id="Mscrm.Form.account.Deactivate.EnableRule">
<ValueRule Field="address1_city" InvertResult="false" Value="London"/>
</EnableRule>
Here we go.
Scenario1: City value is not London -- Deactivate Button got disabled.
Scenario2: City value is London -- Deactivate Button got enabled.
How to override System Ribbon Button in CRM 2011 ( Display / Enable Rule to System Ribbon Button in CRM 2011)?
How to show / hide a system button based on a value on the form?
In CRM 2011, it is possible to override the System ribbon button functionality. Also we could apply Enable / Disable Rule Display / Hide Rule to the existing System Ribbon button.
In order to grasp this quickly, lets consider a scenario.
As we all know, there is a Deactivate system ribbon button on the Account form.
Suppose we would like to Enable / Disable this button based on a value on the Account form. To make it simple, lets consider the City field.
For instance, if the city is London, then Deactivate system button should be enabled. Also we should be able to fire our custom javascript when the Deactivate System button gets clicked. This sample could take you through very useful scenarios.
There is a key to unlock the door here. what is that key ? Lets see.
If you refer the SDK, you could find the following folder and file
sdk\resources\exportedribbonxml\accountribbon.xml
Lets find out our System Deactivate button.
Please Note: We don't need to write the following piece of code. This is just an easy way to refer and then to find the key from SDK.
<Button Id="Mscrm.Form.account.Deactivate" ToolTipTitle="$Resources:Ribbon.HomepageGrid.account.Record.Status.Deactivate" ToolTipDescription="$Resources(EntityPluralDisplayName):Ribbon.Tooltip.Deactivate" Command="Mscrm.Form.Deactivate" Sequence="60" Alt="$Resources:Ribbon.HomepageGrid.account.Record.Status.Deactivate" LabelText="$Resources:Ribbon.HomepageGrid.account.Record.Status.Deactivate" Image16by16="/_imgs/ribbon/deactivate16.png" Image32by32="/_imgs/ribbon/Deactivate_32.png" TemplateAlias="o2" />
Now can you guess what's the key in this? Its nothing but the Command.
The only key thing we need to override the System Ribbon button is to know the command value. Rest is as easy as we open a door with a valid key. We need to write the CommandDefinition as shown below.
Please make sure that the code is written under right parent tags.
<CommandDefinition Id="Mscrm.Form.Deactivate">
<EnableRules>
<EnableRule Id="Mscrm.Form.account.Deactivate.EnableRule"></EnableRule>
</EnableRules>
<DisplayRules></DisplayRules>
<Actions>
<JavaScriptFunction Library="$webresource:ap_DeactivateOverride.js" FunctionName="DeactivateOverride" />
</Actions>
</CommandDefinition>
Also the enable rule under rule definitions as show in the above picture.
<EnableRule Id="Mscrm.Form.account.Deactivate.EnableRule">
<ValueRule Field="address1_city" InvertResult="false" Value="London"/>
</EnableRule>
Here we go.
Scenario1: City value is not London -- Deactivate Button got disabled.
Scenario2: City value is London -- Deactivate Button got enabled.
Scenario3: City value is London -- Deactivate Button was clicked by the user. (alert from custom js function)
As this is my first post in 2012,
"тнєяє ѕнαℓℓ вє ѕнσωєяѕ σƒ вℓєѕѕιηg тσ уσυ αℓℓ ιη тнє вℓσωιηg ƒℓσωєя -2012"
Subscribe to:
Posts (Atom)