1
votes

I am new with Dynamics 365 and are not sure of how I can achieve this. I am looking into having some buttons in a view. Maybe a view isn't the best way of doing it, but what I want to do is to have a list of records connected to the logged in user (similar to a view) But on each row/record I want to have multiple buttons. These buttons can be like 'Complete' (Changes status on task and updates the view) , 'Send email'(Starts a workflow) and so on.

What are some of the ways of doing this? Either with Javascript/C#/plugin or something else.

3

3 Answers

1
votes

You cannot add buttons in views/subgrids directly.

That’s when we add ribbon/command bar buttons using Ribbon workbench usually.

Create a Workflow Short Cut Ribbon Button (No Code Solution!)

Update:

There is a PowerApps Components Framework (PCF - preview) coming out soon, then we can build custom grid control with the layout/buttons we want.

0
votes

This can be achieved with RibbonWorkbench. My answer does not differ much with @arun vinoth answer but just added few explanation lines.

https://ribbonworkbench.uservoice.com/knowledgebase/articles/132235-create-a-workflow-short-cut-ribbon-button-no-code

If you look at view below where I have selected number of contact and then I have a Button at top "Nominieren" which is shown and clicking on it will perform whatever action is needed.

There will be java-script on click of button, from Java script you could call Action or workflow or perform operation in Java script itself.

Link for Adding new Button : https://community.dynamics.com/crm/b/crmtipsfromadeveloper/archive/2017/07/26/know-how-add-a-ribbon-button-using-ribbon-workbench enter image description here

Now when you look at image below I have no contact selected and it does not show button on Ribbon. enter image description here

0
votes

It might be possible. I haven't tried this but you can write JavaScript for a view column now (since CRM 2016).

If you go to a view you can double click on a view column to view its properties. There are two properties you might be interested in:

  1. Web Resource
  2. Function

Here's a link to an MS page that explains how to use these options to add an icon. It might be possible to create a clickable button which uses CRM's WebApi to perform some actions: Docs @ Microsoft

Screenshot