ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

How can you trigger SharePoint out-of-box workflow by button click?

How can you change the workflow status by clicking a button, like, if I click submit button the workflow status will change to Approved etc.

user-image
تم إضافة السؤال من قبل Ikram Ullah , Senior Software Engineer , Kafalah Program for SMEs - SIDF
تاريخ النشر: 2016/12/26
Raju Bisht
من قبل Raju Bisht , Project Lead

we will use OOB default workflow for Approval.

Gaurav Agarwal
من قبل Gaurav Agarwal , Team Member , Micromax Informatics Ltd

Use OOB Content approval Workflow.

Asif ahmed Syed
من قبل Asif ahmed Syed , Lead SharePoint Application Developer , International Center for Sports Security

create a field named "Form status" in your form, on button click set the field status to "Workflow Started".In the workflow check first conditionIf Form Status = workflow started. And then next rule in the workflow should be Start approval process. The approval process will assign the task to each user mentioned in your workflow and when workflow will complete it will set workflow status to"Approved/Rejected". And select checkbox for workflow start condition to"Start workflow when item is changed".

Ahmed Omran Ahmed Said Omran
من قبل Ahmed Omran Ahmed Said Omran , Senior SharePoint Developer , Sure

Create a workflow button:SharePoint Designer icon

  • Open SharePoint Designer.
  • From the Workflows, select the workflow for which you want to create a button in the SharePoint ribbon.
  • If you want to use a workflow that has settings for automatic execution, like s.tart options and conditions, remove these settings.
  • Go to Edit workflow.
  • Press the Action button and select Set Field in Current Item. Now, under Stage 1, you will get the text “Set field to value”.
  • Click on field and set it to the column you want to be changed when the workflow is run. Here it is Document Status.
  • Set value to the value you want to use. Here it is Expired.
  • Now set your desired actions that you want to perform through this workflow. SharePoint workflow window
  • Make sure the checkbox Allow this workflow to be manually started is checked under Start Options.
  • Publish the workflow.
  • From Lists and Libraries, open the original list or library.
  • Click Custom Action under the List Settings tab, and select View Ribbon.
  • Enter a caption for the workflow button, a description and select theInitiate workflow radio button and the workflow you want to run when this workflow button is pressed.Create custom action window
  • Click OK.

Add an icon to the workflow button

  • Save a 16X16 or 32X32 icon to Site Assets inside Site Contents of the SharePoint site where you have placed the workflow button.
  • Open SharePoint DesignerLists and Libraries, and open the SharePoint button you have created.
  • Enter the path to the button image in Site Assets in the Button Image URL field as per your icon size.
  • Click OK.

Muhammed Effat Ahmed Afifi
من قبل Muhammed Effat Ahmed Afifi , Project Leader [Microsoft Business Unit] , Wipro Arabia Limited

Hi,

 

Simply by Edit the page (HTML using SP Designer) that contain the approval button and using JSOM (JavaScript object model) you can do any additional action on that button ...

 

hope this help ...

المزيد من الأسئلة المماثلة