Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Object to Save Record Based on Value

MJN0910
Contributor

I am trying to create a custom object to save a record based on a value in a values list. The field ID is 38492 and the value ID is 12987. Below is what I have so far, but no luck, any ideas?

<script type="text/javascript">
Sys.Application.add_load(function() {
if ($CM.getFieldValue(38492) == '12987:0') {
$("#master_btnApply").click();
()
}
});
</script>

1 REPLY 1

DeanAllen
Contributor III

Why are there two parenthesis after the button click?

<script type="text/javascript">
Sys.Application.add_load(function() {
if ($CM.getFieldValue(38492) == '12987:0') {
$("#master_btnApply").click();
()
}
});
</script>