AnsweredAssumed Answered

Cannot programmatically set value of drop down in Sugar 7.8.2.1

Question asked by Pat Pawlowski on Jul 6, 2017
Latest reply on Jul 7, 2017 by sidhu sidhu

Here is my code from create.js

this.model.set('resource_rate','200');

The entire code is more complicated than that but that is the part that doesn't work. 

 

The user case is that the resource_rate field is dependent on the resource_type field. Different resource_types have different available resource_rates. The client wants the resource_rate to default to the highest rate for the type whenever the resource_type is changed. All of this code works. I can get the correct value to set the resource_rate to but when I set it it isn't reflected in the interface. 

 

The resource_rate just changes to "Select..." on the user interface. The value is set. If I click save the value saves. 

 

Any thoughts on how to update the drop down show it shows the current value? 

 

Thanks,

 

-pat

Outcomes