Enable activity menu
ribbon buttons for custom entities
If you have enabled activities for a custom entity in
Dynamics CRM you might want those activities to be created from the ribbon menu
without navigating; like this:
Then you have to follow these steps:
First install Ribbon Work Bench (you can download it from http://develop1.net/public/rwb/ribbonworkbench.aspx)
Then create a solution and include only the entity you want
to add ribbon buttons.
Open ribbon work bench and open that solution you created.
There you have to add a command for each activity type. E.g.
Email, Phone Call, Task, Appointment etc. No need to create any buttons.
Commands will do the job.
Email Button:
Command Id: Mscrm.SendEmailPrimaryRecord
Action:
Javascript Command
Function
Name: Mscrm.RibbonActions.addActivityOnForm
Library:
/_static/_common/scripts/RibbonActions.js
Parameters:
Int Parameter, Value: 4202
Display Rules:
Id: Mscrm.AddActivityToPrimary
IsCore: False
Steps:
i)
EntityPrivilegeRule
-
AppliesTo: PrimaryEntity
-
PrivilegeDepth: Basic
-
PrivilegeType: AppendTo
ii)
EntityPrivilegeRule
-
EntityName: activitypointer
-
PrivilegeDepth: Basic
-
PrivilegeType: Create
iii)
EntityPrivilegeRule
-
EntityName: activitypointer
-
PrivilegeDepth: Basic
-
PrivilegeType: Append
iv)
EntityPropertyRule
-
AppliesTo: PrimaryEntity
-
PropertyName: HasActivities
Id: Mscrm.WriteActivityPermission
IsCore: False
Steps:
-
EntityName: activitypointer
-
PrivilegeDepth: Basic
-
PrivilegeType: Write
EnableRules
Id: Mscrm.FormStateExistingOrReadOnly
IsCore: False
Steps:
2.
Id: Mscrm.AppendToPrimary
IsCore: False
Follow the same pattern and create commands
for each activity type. Only difference is the integer parameter value needs to
be changed based on the activity type.
Using Dynamics 365(hosted).
ReplyDeleteI'm able to get the ribbon items to show up, but when I click on them they don't open..