We are using otrs , and below is the description :
Task : To add a Dropdown dynamic field whose data is filled using external data-source.
What works well : We create extdata.pl in bin folder, when we explore this file in browser , it gives us the expected output.
How we implement this : We use viewtopic.php?f=60&t=17033 link to implement the list type drop down. As in the same post, as shown below is mention
Code: Select all
Also, it *might* be likely that a DynamicField_XXX configured as a dropdown/Select might be problematic if you provide values that aren't in the list.
An option to workaround this is to use a Dynamic Field that's a text input and change an input to a select or to use autocomplete/fuzzy search.
Code: Select all
$("#FromCustomer").on("focusout",setInterval(function(Event)
{
if ($("#CustomerID").val() != lastValue)
{
lastValue = $("#CustomerID").val();
$.ajax({
type: 'get' ,
dataType: 'html' ,
url: 'http://1.1.2.2/otrs/extdata.pl' +'?q=' + lastValue ,
success: function(html)
{
$('.Row_DynamicField_TRP').show();
$("#DynamicField_TRP")
.replaceWith('<select id="DynamicField_TRP" name="DynamicField_TRP" >' +
html +
'</select>');
}
});
}
So how can we maintain the dropdown and there values to be maintain.
Any idea on this will helpful to us. Let us know if any more inputs to describe issue required.
Thanking you in advance.