Important Update: Community URLs redirect issues are partially resolved. Learn More. .
2021-12-13 04:22 AM
Hi, i added a custom object that set a value list. This is the code:
<div class="toolbar-app-buttons-left">
<a title="Review" class="tb-btn-link-left" id="btnSetValue" href="javascript:void(0);" data-check-dirty="true">
<div class="tb-btn" data-icon="" data-icon-pos="right">Submit Questionnaire</div>
</a>
</div>
<script type="text/javascript">
var integration = {
FieldIdStatus:"25407",
statusSubmit:"83873"
};
$('#btnSetValue').click(function(){
UpdatesDate(integration.FieldIdStatus, integration.statusSubmit);
});
function UpdatesDate(Status, assignedValue) {
var valueArray = new Array(1);
valueArray[0] = assignedValue;
$CM.setFieldValue(Status , valueArray, '');
$('#master_btnApply').click()
}
</script>
But when i click the first time, the value list is not updated. I need to click twice. What could be the problem?
Thanks in advance
2021-12-14 05:29 PM
Out of curiosity, I just pasted the code to my environment and works fine. 6.9 SP1 P5.
2021-12-15 03:20 AM
Hi Ilya, i checked that the code works fine if the value list is a radio button. If the value list is a dropdown list, we have more problems
Thanks!
2021-12-15 03:25 AM
I tested with dropdown, and it is still fine.
2021-12-15 03:38 AM
Hi, our version is Version 6.8 P4 HF2. I will try in other instance with 6.9.
2021-12-15 06:04 AM - edited 2021-12-15 06:04 AM
Hi Ilya i did some tests i cheched this:
If the record has a empty value in the value list and i execute the custom object, works fine. I check that this process call to getvaluelist.
But if the record has a value selected and y want to change this to other, i checked that there isnt a call to getvaluelist. For this reason, when i click the first time, the value list change to empty. In the second click, because the custom object click the save button, the code works fine.
Could you confirm if you have the same behaviour?
Thanks
2021-12-15 08:53 AM
Nope, it works for me regardless what is the value before empty of another value. And I did not do any modification to your code except different IDs.
2021-12-15 09:05 AM
Hi Ilya, thanks for the information. In my instance, when i execute the code the first time, if the value list is filled, i checked that GetListvalue procedure is not called, but if is empty the call is executed y the code works fine.
2021-12-15 09:06 AM
Wonder if you can ask from support about your behaviour then.
2021-12-15 09:10 AM
Ok thanks, is possible this behaviour is related with the versión