Custom Task with enum picker
I'm trying to create a Custom Task with an enum pickeR. For example to set the Service Request area.
I followed the example on the Support Portal with the resolution category.
In my custom task I can select an Area properly, but it doesn't save the value I select.
Am I missing some step?
Code attached.
Thanks !!
Best Answer
-
Roland_Kind Partner Advanced IT Monkey ✭✭✭
Hi Valerie,
just use the following lines (in addition to your code)
saveStatus: function () {
console.log("saving values");
viewModel.Area.set("Id", this.Area.Id);
viewModel.Area.set("Name", this.Area.Name);
NewValue=this.Area.Id;
$('[data-role=Area]').each(function (index){
$(this).data('kendoExtDropDownTreeViewV3')._dropdown.value(NewValue)
});},
now it should work
regards
Roland
5
Answers
Hi,
maybe the following link will help you, too:
https://community.cireson.com/discussion/comment/4354#Comment_4354
(refer to the last posting)
regards
Roland
But it's not really helping me. I'm not able to get the selected value from my custom task and use this to update the field.
I followed this example: https://support.cireson.com/KnowledgeBase/View/1195#/
Only instaed of using Incident Resolution Category; I'm using Service Request Area.
I'm able to select the correct Area. But it's not updated when I clik OK on my custom task
You are not saving the value back to the form. You can use something like
viewModel.set("FIELDHERE", {ID: ID_FROM_PICKER, Name: NAME_FROM_PICKER});
Edit: I meant Valerie not Roland, sorry.
Hi Valerie,
just use the following lines (in addition to your code)
saveStatus: function () {
console.log("saving values");
viewModel.Area.set("Id", this.Area.Id);
viewModel.Area.set("Name", this.Area.Name);
NewValue=this.Area.Id;
$('[data-role=Area]').each(function (index){
$(this).data('kendoExtDropDownTreeViewV3')._dropdown.value(NewValue)
});
},
now it should work
regards
Roland