Adding a button to a shreapoint page

Hi,

Is it possible to add a button to a sharepoint page, on click of which I want some emails to go to some people and a field gets updated in a list.

How can I create such a button. Also do we have to use a workflow and attached it to button click event.

Kindly help.

Many thanks.

February 6th, 2015 2:21am

hi,

You can create a custom action in SharePoint.

use below link for refrences.

http://www.abelsolutions.com/totm/creating-a-custom-action-in-2-steps-with-sharepoint-designer/

http://www.sharepoint-journey.com/custom-actions-in-sharepoint-2013.html

Free Windows Admin Tool Kit Click here and download it now
February 6th, 2015 2:29am

Hi Nikhil,

Thanks for your response. I knew of these methods. These will allow us to add custom action on the ribbon.

I want to add a button in a page somewhere and then on click of that it should invoke a workflow. Is that possible.

Thanks again !

Regards,

February 6th, 2015 3:50am

You can create a web part with button in it. The button click handler will contain a code to send email and also update a list item.

You can use SPUtility.SendEmail to send the email. Here is an example to send mails:

https://www.collaboris.com/blogs/collaboris-blog/mark-jones/2012/11/06/code-sample-how-to-programmatically-send-an-email-in-sharepoint#.VNSBatmqqiY

This example shows how to create a web part and it controls like button to it:

https://msdn.microsoft.com/en-us/library/ee231546.aspx

Finally you need to drop this web part on a page.

Free Windows Admin Tool Kit Click here and download it now
February 6th, 2015 4:05am

Hi,

You can use the script editor and add a button.  On click event you can write the workflow invoke code.

Please use the following blog how to invoke workflow from the JavaScript.

SharePoint 2013: Start Workflow with JavaScript Client Object Model

Please don't forget to mark it as answered, if your problem resolved or helpful.

  • Marked as answer by Prajk11 2 hours 45 minutes ago
February 6th, 2015 4:16am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics