Adding Convert Email To Task in Email Ribbon MS CRM 2011

Today I saw one thread in CRM Development form to create a button in email ribbon to task from current email activity. So thought to create the same. In this post I am going to create a button in email ribbon to create task from email. you can use below code for the same

<RibbonDiffXml>

        <CustomActions>

          <CustomAction Id=”EmailToTask” Location=”Mscrm.Form.email.MainTab.Convert.Controls._children” Sequence=”40″>

            <CommandUIDefinition>

              <Button Id=”Mscrm.Form.email.Convert.ToTask” Sequence=”50″ Command=”Mscrm.Form.email.TaskCommand” LabelText=”EmailToTask” Image16by16=”/_imgs/ribbon/Converttotask_16.png” Image32by32=”/_imgs/ribbon/Converttotask_32.png” TemplateAlias=”o2″ ToolTipDescription=”Convert Email To Task” />

            </CommandUIDefinition>

          </CustomAction>

        </CustomActions>

        <Templates>

          <RibbonTemplates Id=”Mscrm.Templates”></RibbonTemplates>

        </Templates>

        <CommandDefinitions>

          <CommandDefinition Id=”Mscrm.Form.email.TaskCommand”>

            <EnableRules />

            <DisplayRules />

            <Actions>

               <JavaScriptFunction FunctionName =”ConverToTask” Library =”$webresource:new_ConvertToTask.js”></JavaScriptFunction>

            </Actions>

          </CommandDefinition>

        </CommandDefinitions>

        <RuleDefinitions>

          <TabDisplayRules />

          <DisplayRules />

          <EnableRules />

        </RuleDefinitions>

        <LocLabels />

      </RibbonDiffXml>

 

** you need to create Converttotask_16.png,Converttotask_32.png and need to copy under “_imgs/ribbon” folder in your crmweb directory.

Enjoy !!

Advertisement

5 Comments (+add yours?)

  1. vikranthp
    Oct 14, 2011 @ 14:25:34

    I just want to add one thing:
    We can create image web resources and refer them in the ribbon customizations instead of copying the images to the “imgs/ribbon” folder.

    Reply

    • mahenderpal
      Oct 14, 2011 @ 15:36:32

      yes surely we can do that, I forget to mention this in my post. just in that case we will refer image as Image16by16=”$webresource:WebResourceName

      Reply

  2. Trackback: Creating Task entity record through rest in MS CRM 2011 « Mahender Pal
  3. daniel
    Jan 10, 2012 @ 18:45:14

    How can I make this work for Outlook 2010 with CRM 2011 Online?

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 36 other followers