function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
carlosumana421carlosumana421 

update Checkbox field on on Confirm

Im Getting the Pop up but cannot get the Checkbox to gert checked if they click OK

 

<script>
function confirmation() {
var answer = confirm('If this is a CO-OP Opportunity, CLICK OK?');
if (answer==True) {
opportunity.Co_Op_Opportunity__c.checked=true;
}
else
{
return false;
}
}
</script>

Rahul SharmaRahul Sharma

In javascript, If you want to manipulate other components on some event, then you need to access the HTML Id of the target component.
I can see that you are trying to access opportunity.Co_Op_Opportunity__c (which might be controller's property) in javascript.

For reference, look at this post for getting some idea.