cancel
Showing results for 
Search instead for 
Did you mean: 

Cancel Workflow using Script/Query

Former Member
0 Kudos

Hi Every One,

I have requirement to cancel workflow from the contract document itself. For that i am trying to create script to get native id of work item and cancel the workflow using the native id. But unfortunately i am getting native id as 'Void' not sure why i am getting void. I got work item object using find method for contract document reference for which we need to cancel the workflow.

Can some one please help me to get this done using script/query so it will be very helpful for me to complete this task. We have tried creating query from standard cancel workflow query also but somehow it is not fetching any results.

Please share a sample code which you have already implemented for this requirement.

Your help will much appreciated.

Regards,

Gurvi.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI Gurvi,

I am not sure why do you want to cancel the workflow at the script level. you have the option to cancel it at Set up level also.

Set Up --> Workflow Definitions -->

Click on the Workflow defintion --> Click on Report tab -- current workflow process and click on "X" button.

Attached screen shot

Former Member
0 Kudos

Hi Gurvi,

Ideally the workflow should be canceled by the Admin only and due to this it is provided as a query.You can give the access to this query to a particular admin only like workflow admin.

Thanks,

Ankur Goyal