Sorry, I will explain my situation:
1) It is a form that has 2 comboboxes, combobox1 (country), filters combobox2 (States), it work ok when you want to create a new document, but I am using the same form to Edit the stored documents.
The problem comes when I want to EDIT a stored document, because I open the form and load the data in the comboboxes.
As the code above shows, I open the entity and asign the values to the comboboxes, I asign the Country and the State. But the State combobox doesnt keep the value, it is reseted to the first value of the list of states for that country (Like when the list has just been filtered after changing the country combobox value.
So I think that after asigning the value to the combobox1 on opening the form, it starts the SelectParameters action, so the combobox2 loses the value that I asigned from the document I want to edit.
With this situation supose you had a document stored with Country = USA and State= Texas. When you open the document you will have Country=USA and State= Alabama (Alabama is because it is the first state on the list).