Workflow 2010 - Tasks
-
- Posts: 11
- Joined: Fri May 11, 2018
Hello,
I´m trying to edit form of workflow task of Workflow 2010. I tried to set buttons based on these instructions https://spform.com/buttons/customizatio ... oint-forms.
I changed in code field TaskOutcome to Outcome. But It is not working.
fd.field('Outcome').value('Rejected');
fd.field('Status').value('Completed');
Do you have experience with that? I can change field %completed, but Outcome not. So worklfow won´t go to next step after I complete task.
Thank you very much for any help.
K.
I´m trying to edit form of workflow task of Workflow 2010. I tried to set buttons based on these instructions https://spform.com/buttons/customizatio ... oint-forms.
I changed in code field TaskOutcome to Outcome. But It is not working.
fd.field('Outcome').value('Rejected');
fd.field('Status').value('Completed');
Do you have experience with that? I can change field %completed, but Outcome not. So worklfow won´t go to next step after I complete task.
Thank you very much for any help.
K.
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Katerina,
So, this code works?
But this one doesn't, correct?
Please, select the the Outcome field on the form, make sure it's present and check its InternalName, it must match the one that you are using in your JavaScript:
So, this code works?
Code: Select all
fd.field('Status').value('Completed');
Code: Select all
fd.field('Outcome').value('Rejected');
Cheers
-
- Posts: 11
- Joined: Fri May 11, 2018
I checked InternalName. It was WorkflowOutcome. I changed it in code, but it is still not working.
Code is:
fd.field('PercentComplete').value('100');
fd.field('Status').value('Completed');
fd.field('WorkflowOutcome').value('Approved');
PercentComplete and Status works correctly.
Code is:
fd.field('PercentComplete').value('100');
fd.field('Status').value('Completed');
fd.field('WorkflowOutcome').value('Approved');
PercentComplete and Status works correctly.
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Katerina,
What type of field is it? It might need a different type of input.
Can you open the form in a browser, select Outcome to be 'Approved', open console and write the following code? Press enter after inputting:
Whatever you get as an output, should in theory work as an input in your code.
What type of field is it? It might need a different type of input.
Can you open the form in a browser, select Outcome to be 'Approved', open console and write the following code? Press enter after inputting:
Code: Select all
fd.field('WorkflowOutcome').value();
Cheers
-
- Posts: 11
- Joined: Fri May 11, 2018
I think this some special Text field created by Workflow 2010. If I click into Content Type, column WorkflowOutcome is not in Columns. I can see it just in view of Task list and Forms Designer.
I tried to write fd.field('WorkflowOutcome').value(); in console, but I get message that fd is not defined.
I tried to write fd.field('WorkflowOutcome').value(); in console, but I get message that fd is not defined.
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Katerina,
If this is the case, it might be tricky to do. Are you opening this form in dialogue mode? Otherwise, the fd variable should be defined. You can either try to open it in full screen or add the following line to Forms Designer's JS Editor:
And try the same code once again from the console.
If this is the case, it might be tricky to do. Are you opening this form in dialogue mode? Otherwise, the fd variable should be defined. You can either try to open it in full screen or add the following line to Forms Designer's JS Editor:
Code: Select all
window.fd = fd;
Cheers
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Katerina,
Not sure, are you inputting - fd.field('WorkflowOutcome').value(); or fd.field('WorkflowOutcome').value("Approved"); ?
To return a value, you need to input specifically:
I assume that fd.field('WorkflowOutcome').value("Approved"); doesn't work from the console either, correct?
Not sure, are you inputting - fd.field('WorkflowOutcome').value(); or fd.field('WorkflowOutcome').value("Approved"); ?
To return a value, you need to input specifically:
Code: Select all
fd.field('WorkflowOutcome').value();
Cheers
-
- Information
-
Who is online
Users browsing this forum: No registered users and 15 guests