Important Update: Some Community URL Redirects are Under Maintenance. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Fetch value from Read Only value List(Dropdown)

sumit_grc
Contributor II

Hello All,

I am trying to build custom object which would autosave the record every 5 minutes if status is "Draft". 
how do we fetch value from value-list to be used in custom object logic ?

since i was not able to fetch value from valuelist i applied the logic by using Calculated text field which is working.


<script type="text/javascript">


Sys.Application.add_load(function() {

var timer;
var timeout = 10000;

if(timer) {
clearTimeout(timer);
}
timer = setTimeout(save, timeout);

 

});


function save() {
var status = $('#master_DefaultContent_rts_s9092_f27513c').text(); 

//This should fetch value from Valuelist

//alert(status);
if (status =='Draft')

{
$('#master_btnApply').click();

}


}
</script>

sumit_grc_0-1684255606057.png

 

 

 

2 REPLIES 2

sumit_grc
Contributor II

Hi @Anonymous @Anonymous 

Can you please suggest ?
also is there a documentation to know to fetch value from different types of fields ?

1)Text Field - '#master_DefaultContent_rts_s9092_f27513c').text();
2)Date Field - $CM.getFieldValue(FieldID));
3)Value List - 

Thanks in Advance


Thanks

Anonymous
Not applicable

Calc fields will not work with $CM. You should just inspect browser of element u need and follow accordingly. No special guideline.