Dynamics 365





Monday, January 20, 2014

Set Notification error messsage in CRM 2011


Please try below code instead of alert box it will be displayed on form.

set_Notification(2, 'source', 'Business Phone must contain 10 numbers.');

Tuesday, January 7, 2014

CRM 2011 - change Ribbon Button Name



Change button Name in ribbon - CRM 2011 dynamics.


Hi,
When we have relationship between two entities, the child entity link add to the left navigation of parent.
For example,
  • “Contacts” link add to the left navigation of “Accounts”
Contacts Associated View In Account Contacts Associated View In Account
The view we call it as “Associate View” and it contains buttons with below naming convention
  • “Add {Display name of child}” (i.e., “Add Contact” in above screen)
  • “Add Existing {Display name of child}” (i.e., “Add Existing Contact” in above screen)
To rename the “Add & Add existing” buttons below are the steps
  • Create a new solution
  • Add child entity (i.e., Contact) in above example
  • Export & Save solution in local folder
  • Extract folder and open “Customizations.XML” in Visual Studio
  • Find <RibbonDiffXml><CustomActions> node
  • Add below XML
          <CustomAction Id=”Mscrm.SubGrid.{Entity Name}.AddNewStandard.CustomAction” Location=”Mscrm.SubGrid.{Entity Name}.AddNewStandard” Sequence=”210″>
<CommandUIDefinition>
<!–New Button Id – AddNewStandard; Existing Button Id – AddExistingStandard–>
<Button Id=”Mscrm.SubGrid.{Entity Name}.AddNewStandard
Command=”Mscrm.AddNewRecordFromSubGridStandard”
Sequence=”20″
LabelText=”My Custom Text
Alt=”My Custom Text
Image16by16=”/_imgs/ribbon/NewRecord_16.png” Image32by32=”/_imgs/ribbon/newrecord32.png”
TemplateAlias=”o1″ ToolTipTitle=”Add New Contact”
ToolTipDescription=”$Resources(EntityDisplayName):Mscrm_SubGrid_EntityLogicalName_MainTab_Management_AddNewStandard_ToolTipDescription” />
</CommandUIDefinition>
</CustomAction>
  • Save, zip & Export solution