Crm Dynamics Plugin to call a contact - dynamics-crm-2011

I am new to dynamics crm programming. Therefore I am having difficulties in understanding few basic things. I am trying to write a plug-in that would call a selected contact when a custom menu button is clicked. All I can understand is I have to create a menu button on the ribbon and handle its events however I cannot find how to create a menu button programmatically. I should be able to do this because when our software is installed and configured for a crm server the UI of the crm pages needs to be updated automatically. The flow is like this. Go to contacts, select a contact and when you click the custom menu button (should be available on the ribbon after our product's installation) the option to call home, office or mobile should be presented to the user and then the call should be placed to the contact. How can I achieve this? Is it handling the javascript events or are there any readily available API to handle the ribbon menu items?

The Ribbon is defined in the Ribbon XML of the solution. You can't programmatically create a button on the fly (although you can use javascript to hide/disable it). Try the Ribbon Editor to get your feet wet with the ribbon.
From there you can use javascript on the click of the button to perform whatever functions you need.

Related

Designing a ribbon button in OfficeJs using manifest

Is it possible to add spacing in between ribbon buttons? I cant seem to design the ribbon in anyway and am constricted to OfficeJs standards.
I would like to design my ribbon, I am currently developing using AngularJS and have created my own custom ribbon but still cant design or add spacing on my buttons.
You can place any controls for your custom ribbon on the task pane. But ribbon customizations in Office applications (made by web add-ins) allow the following control types:
Simple buttons - trigger specific actions.
Menus - simple menu dropdown with buttons that trigger actions.
There is no property for configuring spaces and etc. Read more about possible ribbon customizations in the Add-in commands for Excel, PowerPoint, and Word article.
You can post or vote for an existing feature request on Tech Community where they are considered when the Office dev team goes through the planning process.

How to show Taskpane selected data in ribbon command using officejs

We are populating list of users in dropdown list Task pane UI. When we are selecting the user in the list we were able to show selected user in taskpane itself.
Also we wanted to show the selected user in ribbon command Menu like in attached screen shot.
The screen shot which took from Excel DNA with .net application the same wanted to achieve in Excel add-in using OfficeJS.
The Fluent UI extensibility level leaves much to be a desire for Web add-ins. See Add-in commands for Excel, PowerPoint, and Word for more information.
If you need to implement dynamic ribbon customizations you need to consider developing a VSTO based add-in instead.
this feature is not yet available with add-in commands. One capability we just announced on the community call was "contextual tabs api". This will be available soon for public preview where you will be able to test it. Please stay tuned for our next community call for an update.

Excel web add-in: How to detect ribbon click events?

I am working with the Excel JavaScript API and I am trying to trigger an event when the user clicks on any ribbon button or tab, and get which button or tab was clicked, but I couldn't find a way to do it.
Can anyone help me?
This isn't a supported scenario in Office.js. Your add-in is running in a sandboxed environment (either within an IFRAME or an embedded browser, depending on the platform). Even in cases where the ribbon buttons are part of your add-in, the communication is one-way (clicking the button will trigger loading a page or firing a function from your add-in).

Popup window inside a task pane add-in

I have a task pane add-in in Office.
I have an item in the task pane, and a delete button. Now, when users click on the delete button, I want to pop up a small window to ask if users are sure about the deletion. If yes, we continue; if no, we go back to the current page.
It is like the Window confirm() method for a web page.
Does anyone know how to pop up this small window in the task pane add-in?
Additionally, if I want users to choose an option in this popup window (eg, choosing a colour between blue or red) before continuing (let's forget yes or no), how could we realise this? More generally, is it possible to create a custom confirm box?
As you design and build web apps for Office 365 or add-ins for Office and SharePoint, you can take advantage of the Office UI toolkit to make your experience look and feel like Office. The Office UI toolkit has key plug and play components that will make it easy to create web experiences that connect to and integrate with Office.
One of the controls offered by Office Fabric JS package is Dialog which has a lot of customization. I believe you'll find one suitable for your task.
Yet another option is to use any UI package which has variety of UI controls, for example jQuery mobile. And finally you may just write your own control.

Sharepoint hide ribbon for standard users

is it possible to hide te ribbon for standard users in Sharepoint ?
I want to see the ribbon when I am a administrator, but what I want is that people can only add a document and not do edit in the ribbon.
SharePoint has no standard way (configuration) to hide Ribbon only for selected users. You can use javascript, maybe jQuery to do it. Ribbon is rendered into <div id="RibbonContainer">.
You can get info about current user via javascript client object model. See MSDN.

Resources